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

Function cmdFindAll

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

Source from the content-addressed store, hash-verified

422}
423
424int cmdFindAll(_In_ LPCTSTR BaseName, _In_opt_ LPCTSTR Machine, _In_ DWORD Flags, _In_ int argc, _In_reads_(argc) PTSTR argv[])
425/*++
426
427Routine Description:
428
429 FINDALL <id> ...
430 use EnumerateDevices to do hardwareID matching
431 for each match, dump to stdout
432 like find, but also show not-present devices
433
434Arguments:
435
436 BaseName - name of executable
437 Machine - if non-NULL, remote machine
438 argc/argv - remaining parameters - passed into EnumerateDevices
439
440Return Value:
441
442 EXIT_xxxx
443
444--*/
445{
446 GenericContext context;
447 int failcode;
448
449 UNREFERENCED_PARAMETER(Flags);
450
451 if(!argc) {
452 return EXIT_USAGE;
453 }
454
455 context.count = 0;
456 context.control = 0;
457 failcode = EnumerateDevices(BaseName,Machine,0,argc,argv,FindCallback,&context);
458
459 if(failcode == EXIT_OK) {
460
461 if(!context.count) {
462 FormatToStream(stdout,Machine?MSG_FIND_TAIL_NONE:MSG_FIND_TAIL_NONE_LOCAL,Machine);
463 } else {
464 FormatToStream(stdout,Machine?MSG_FIND_TAIL:MSG_FIND_TAIL_LOCAL,context.count,Machine);
465 }
466 }
467 return failcode;
468}
469
470int cmdStatus(_In_ LPCTSTR BaseName, _In_opt_ LPCTSTR Machine, _In_ DWORD Flags, _In_ int argc, _In_reads_(argc) PTSTR argv[])
471/*++

Callers

nothing calls this directly

Calls 2

EnumerateDevicesFunction · 0.85
FormatToStreamFunction · 0.85

Tested by

no test coverage detected