VirtualBox

Ignore:
Timestamp:
Jan 29, 2016 1:19:08 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
105304
Message:

BugReportTool(bugref:8169): version reporting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxBugReport/VBoxBugReport.cpp

    r59500 r59521  
    2727#include <VBox/version.h>
    2828
     29#include <iprt/buildconfig.h>
    2930#include <iprt/env.h>
    3031#include <iprt/file.h>
     
    7576    "   any VM names provided and included all registered machines.\n"
    7677    "Options:\n"
    77     "   -h, -help,   --help    Print usage information\n"
    78     "   -A, -all,    --all     Include all registered machines\n"
    79     "   -o, -output, --output  Specifies the name of the output file\n"
    80     "   -t, -text,   --text    Produce a single text file instead of compressed TAR\n"
     78    "   -h, -help,    --help     Print usage information\n"
     79    "   -A, -all,     --all      Include all registered machines\n"
     80    "   -o, -output,  --output   Specifies the name of the output file\n"
     81    "   -t, -text,    --text     Produce a single text file instead of compressed TAR\n"
     82    "   -V, -version, --version  Print version number and exit\n"
    8183    "\n";
    8284
     
    491493
    492494
     495static void printHeader(void)
     496{
     497    RTStrmPrintf(g_pStdErr, VBOX_PRODUCT " Bug Report Tool " VBOX_VERSION_STRING "\n"
     498                 "(C) " VBOX_C_YEAR " " VBOX_VENDOR "\n"
     499                 "All rights reserved.\n\n");
     500}
     501
    493502int main(int argc, char *argv[])
    494503{
     
    498507     */
    499508    RTR3InitExe(argc, &argv, 0);
    500 
    501     RTStrmPrintf(g_pStdErr, VBOX_PRODUCT " Bug Report Tool " VBOX_VERSION_STRING "\n"
    502                  "(C) " VBOX_C_YEAR " " VBOX_VENDOR "\n"
    503                  "All rights reserved.\n\n");
    504509
    505510    bool fAllMachines = false;
     
    520525        {
    521526            case 'h':
     527                printHeader();
    522528                RTStrmPrintf(g_pStdErr, g_szUsage, argv[0]);
    523529                return 0;
     
    531537                fTextOutput = true;
    532538                break;
     539            case 'V':
     540                RTPrintf("%sr%s\n", RTBldCfgVersion(), RTBldCfgRevisionStr());
     541                return 0;
    533542            case VINF_GETOPT_NOT_OPTION:
    534543                nameList.push_back(ValueUnion.psz);
     
    538547        }
    539548    }
     549
     550    printHeader();
    540551
    541552    HRESULT hr = S_OK;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette