MCPcopy Create free account
hub / github.com/NullArray/WinKernel-Resources / cmdStatus

Function cmdStatus

Drivers/Driver-SRC/setup/devcon/cmds.cpp:470–514  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

468}
469
470int cmdStatus(_In_ LPCTSTR BaseName, _In_opt_ LPCTSTR Machine, _In_ DWORD Flags, _In_ int argc, _In_reads_(argc) PTSTR argv[])
471/*++
472
473Routine 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
480Arguments:
481
482 BaseName - name of executable
483 Machine - if non-NULL, remote machine
484 argc/argv - remaining parameters - passed into EnumerateDevices
485
486Return 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
517int cmdResources(_In_ LPCTSTR BaseName, _In_opt_ LPCTSTR Machine, _In_ DWORD Flags, _In_ int argc, _In_reads_(argc) PTSTR argv[])

Callers

nothing calls this directly

Calls 2

EnumerateDevicesFunction · 0.85
FormatToStreamFunction · 0.85

Tested by

no test coverage detected