Changeset 70319 in vbox
- Timestamp:
- Dec 22, 2017 1:32:15 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/tools/RTLdrCheckImports.cpp
r70311 r70319 59 59 /** The loader architecture. */ 60 60 RTLDRARCH enmLdrArch; 61 /** Verbosity level. */ 62 unsigned cVerbosity; 61 63 } RTCHECKIMPORTSOPTS; 62 64 /** Pointer to the checker options. */ … … 250 252 { 251 253 pModule->hLdrMod = hLdrMod; 252 RTMsgInfo("Import '%s' -> '%s'\n", pModule->szModule, szPath); 254 if (pOpts->cVerbosity > 0) 255 RTMsgInfo("Import '%s' -> '%s'\n", pModule->szModule, szPath); 253 256 } 254 257 else if (RTErrInfoIsSet(pErrInfo)) … … 353 356 } 354 357 355 RTMsgInfo("Import '%s' -> '%s' (%u exports)\n", pModule->szModule, szPath, pModule->cExports); 358 if (pOpts->cVerbosity > 0) 359 RTMsgInfo("Import '%s' -> '%s' (%u exports)\n", 360 pModule->szModule, szPath, pModule->cExports); 356 361 } 357 362 else … … 392 397 static int rtCheckImportsForImage(PCRTCHECKIMPORTSOPTS pOpts, const char *pszImage) 393 398 { 399 if (pOpts->cVerbosity > 0) 400 RTMsgInfo("Checking '%s'...\n", pszImage); 401 394 402 /* 395 403 * Open the image. … … 592 600 Opts.papszPaths = NULL; 593 601 Opts.enmLdrArch = RTLDRARCH_WHATEVER; 602 Opts.cVerbosity = 1; 594 603 595 604 static const RTGETOPTDEF s_aOptions[] = … … 597 606 { "--path", 'p', RTGETOPT_REQ_STRING }, 598 607 { "--export", 'e', RTGETOPT_REQ_STRING }, 608 { "--quiet", 'q', RTGETOPT_REQ_NOTHING }, 609 { "--verbose", 'v', RTGETOPT_REQ_NOTHING }, 599 610 }; 600 611 RTGETOPTSTATE State; … … 626 637 break; 627 638 639 case 'q': 640 Opts.cVerbosity = 0; 641 break; 642 643 case 'v': 644 Opts.cVerbosity = 0; 645 break; 646 628 647 case VINF_GETOPT_NOT_OPTION: 629 648 rc = rtCheckImportsForImage(&Opts, ValueUnion.psz); … … 633 652 634 653 case 'h': 635 RTPrintf("Usage: RTCheckImports [-p|--path <dir>] [- h|--help] [-V|--version] <image [..]>\n"654 RTPrintf("Usage: RTCheckImports [-p|--path <dir>] [-v|--verbose] [-q|--quiet] <image [..]>\n" 636 655 " or: RTCheckImports -e <image>\n" 656 " or: RTCheckImports <-h|--help>\n" 657 " or: RTCheckImports <-V|--version>\n" 637 658 "Checks library imports. VFS chain syntax supported.\n" 638 659 "\n" … … 642 663 " -e, --export <image>\n" 643 664 " Write export list for the file to stdout. (Redirect to a .export file.)\n" 665 " -q, --quiet\n" 666 " Quiet execution.\n" 667 " -v, --verbose\n" 668 " Increases verbosity.\n" 644 669 "" 645 670 );
Note:
See TracChangeset
for help on using the changeset viewer.