VirtualBox

Changeset 82921 in vbox for trunk


Ignore:
Timestamp:
Jan 30, 2020 11:00:45 AM (5 years ago)
Author:
vboxsync
Message:
Main/VBoxSVC: Implemented command line help for XPCOM implementation (-hhelp).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/xpcom/server.cpp

    r76592 r82921  
    3232
    3333#include <VBox/param.h>
     34#include <VBox/version.h>
    3435
    3536#include <iprt/buildconfig.h>
     
    628629}
    629630
     631static void showUsage(const char *pcszFileName)
     632{
     633    RTPrintf(VBOX_PRODUCT " VBoxSVC "
     634             VBOX_VERSION_STRING "\n"
     635             "(C) 2005-" VBOX_C_YEAR " " VBOX_VENDOR "\n"
     636             "All rights reserved.\n"
     637             "\n");
     638    RTPrintf("By default the service will be started in the background.\n"
     639             "\n");
     640    RTPrintf("Usage:\n"
     641             "\n");
     642    RTPrintf("  %s\n", pcszFileName);
     643    RTPrintf("\n");
     644    RTPrintf("Options:\n");
     645    RTPrintf("  -a, --automate            Start XPCOM on demand and daemonize.\n");
     646    RTPrintf("  -A, --auto-shutdown       Shuts down service if no longer in use.\n");
     647    RTPrintf("  -d, --daemonize           Starts service in background.\n");
     648    RTPrintf("  -D, --shutdown-delay <ms> Sets shutdown delay in ms.\n");
     649    RTPrintf("  -h, --help                Displays this help.\n");
     650    RTPrintf("  -p, --pidfile <path>      Uses a specific pidfile.\n");
     651    RTPrintf("  -F, --logfile <path>      Uses a specific logfile.\n");
     652    RTPrintf("  -R, --logrotate <count>   Number of old log files to keep.\n");
     653    RTPrintf("  -S, --logsize <bytes>     Maximum size of a log file before rotating.\n");
     654    RTPrintf("  -I, --loginterval <s>     Maximum amount of time to put in a log file.\n");
     655
     656    RTPrintf("\n");
     657}
     658
    630659int main(int argc, char **argv)
    631660{
     
    643672        { "--auto-shutdown",    'A', RTGETOPT_REQ_NOTHING },
    644673        { "--daemonize",        'd', RTGETOPT_REQ_NOTHING },
     674        { "--help",             'h', RTGETOPT_REQ_NOTHING },
    645675        { "--shutdown-delay",   'D', RTGETOPT_REQ_UINT32 },
    646676        { "--pidfile",          'p', RTGETOPT_REQ_STRING },
     
    709739
    710740            case 'h':
    711                 RTPrintf("no help\n");
     741                showUsage(argv[0]);
    712742                return RTEXITCODE_SYNTAX;
    713743
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