UsbDkControl: Introduce ping CLI
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
This commit is contained in:
parent
244ade2a35
commit
32154c09ef
1 changed files with 16 additions and 0 deletions
|
|
@ -15,6 +15,7 @@ void ShowUsage()
|
|||
tcout << endl;
|
||||
tcout << TEXT("UsbDkController -i - install UsbDk driver") << endl;
|
||||
tcout << TEXT("UsbDkController -u - uninstall UsbDk driver") << endl;
|
||||
tcout << TEXT("UsbDkController -p - TEMP: ping driver (verify control device is functional)") << endl;
|
||||
tcout << endl;
|
||||
}
|
||||
//-------------------------------------------------------------------------------
|
||||
|
|
@ -55,6 +56,21 @@ int __cdecl _tmain(int argc, _TCHAR* argv[])
|
|||
tcout << TEXT("UsbDk driver uninstall failed") << endl;
|
||||
}
|
||||
}
|
||||
else if (_tcsicmp(L"-p", argv[1]) == 0)
|
||||
{
|
||||
//TODO: Ping logic is temporary, to be removed after enumeration
|
||||
//logic implemented
|
||||
TCHAR Reply[10];
|
||||
tcout << TEXT("Pinging UsbDk driver") << endl;
|
||||
if (PingDriver(Reply, TBUF_SIZEOF(Reply)))
|
||||
{
|
||||
tcout << TEXT("UsbDk driver replied \"") << Reply << TEXT("\"") << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
tcout << TEXT("UsbDk ping failed") << endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowUsage();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue