| 468 | } |
| 469 | |
| 470 | int cmdStatus(_In_ LPCTSTR BaseName, _In_opt_ LPCTSTR Machine, _In_ DWORD Flags, _In_ int argc, _In_reads_(argc) PTSTR argv[]) |
| 471 | /*++ |
| 472 | |
| 473 | Routine Description: |
| 474 | |
| 475 | STATUS <id> ... |
| 476 | use EnumerateDevices to do hardwareID matching |
| 477 | for each match, dump status to stdout |
| 478 | note that we only enumerate present devices |
| 479 | |
| 480 | Arguments: |
| 481 | |
| 482 | BaseName - name of executable |
| 483 | Machine - if non-NULL, remote machine |
| 484 | argc/argv - remaining parameters - passed into EnumerateDevices |
| 485 | |
| 486 | Return Value: |
| 487 | |
| 488 | EXIT_xxxx |
| 489 | |
| 490 | --*/ |
| 491 | { |
| 492 | GenericContext context; |
| 493 | int failcode; |
| 494 | |
| 495 | UNREFERENCED_PARAMETER(Flags); |
| 496 | |
| 497 | if(!argc) { |
| 498 | return EXIT_USAGE; |
| 499 | } |
| 500 | |
| 501 | context.count = 0; |
| 502 | context.control = FIND_DEVICE | FIND_STATUS; |
| 503 | failcode = EnumerateDevices(BaseName,Machine,DIGCF_PRESENT,argc,argv,FindCallback,&context); |
| 504 | |
| 505 | if(failcode == EXIT_OK) { |
| 506 | |
| 507 | if(!context.count) { |
| 508 | FormatToStream(stdout,Machine?MSG_FIND_TAIL_NONE:MSG_FIND_TAIL_NONE_LOCAL,Machine); |
| 509 | } else { |
| 510 | FormatToStream(stdout,Machine?MSG_FIND_TAIL:MSG_FIND_TAIL_LOCAL,context.count,Machine); |
| 511 | } |
| 512 | } |
| 513 | return failcode; |
| 514 | } |
| 515 | |
| 516 | |
| 517 | int cmdResources(_In_ LPCTSTR BaseName, _In_opt_ LPCTSTR Machine, _In_ DWORD Flags, _In_ int argc, _In_reads_(argc) PTSTR argv[]) |
nothing calls this directly
no test coverage detected