Commit d09c5346 authored by pjwilliams's avatar pjwilliams
Browse files

smartd: don't include long options in usage message if HAVE_GETOPT_LONG is not set


git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@358 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 09abe20d
......@@ -50,7 +50,7 @@
// CVS ID strings
extern const char *CVSid1, *CVSid2;
const char *CVSid6="$Id: smartd.c,v 1.83 2002/12/05 05:52:07 ballen4705 Exp $"
const char *CVSid6="$Id: smartd.c,v 1.84 2002/12/05 23:10:10 pjwilliams Exp $"
CVSID1 CVSID2 CVSID3 CVSID4 CVSID7;
// global variable used for control of printing, passing arguments, etc.
......@@ -335,12 +335,21 @@ return;
/* prints help information for command syntax */
void Usage (void){
#ifdef HAVE_GETOPT_LONG
printout(LOG_INFO,"Usage: smartd [-XVh] [--debugmode] [--version] [--help]\n\n");
printout(LOG_INFO,"Command Line Options:\n");
printout(LOG_INFO," -X, --debugmode\n Start smartd in debug mode\n\n");
printout(LOG_INFO," -V, --version, --license, --copyright\n");
printout(LOG_INFO," Print License, Copyright, and version information\n\n");
printout(LOG_INFO," -h, -?, --help, --usage\n Display this help and exit\n\n");
#else
printout(LOG_INFO,"Usage: smartd [-XVh]\n\n");
printout(LOG_INFO,"Command Line Options:\n");
printout(LOG_INFO," -X Start smartd in debug mode\n");
printout(LOG_INFO," -V Print License, Copyright, and version information\n");
printout(LOG_INFO," -h Display this help and exit\n");
printout(LOG_INFO," -? Same as -h\n");
#endif
printout(LOG_INFO,"\n");
printout(LOG_INFO,"Optional configuration file: %s\n",CONFIGFILE);
Directives();
......
......@@ -50,7 +50,7 @@
// CVS ID strings
extern const char *CVSid1, *CVSid2;
const char *CVSid6="$Id: smartd.cpp,v 1.83 2002/12/05 05:52:07 ballen4705 Exp $"
const char *CVSid6="$Id: smartd.cpp,v 1.84 2002/12/05 23:10:10 pjwilliams Exp $"
CVSID1 CVSID2 CVSID3 CVSID4 CVSID7;
// global variable used for control of printing, passing arguments, etc.
......@@ -335,12 +335,21 @@ return;
/* prints help information for command syntax */
void Usage (void){
#ifdef HAVE_GETOPT_LONG
printout(LOG_INFO,"Usage: smartd [-XVh] [--debugmode] [--version] [--help]\n\n");
printout(LOG_INFO,"Command Line Options:\n");
printout(LOG_INFO," -X, --debugmode\n Start smartd in debug mode\n\n");
printout(LOG_INFO," -V, --version, --license, --copyright\n");
printout(LOG_INFO," Print License, Copyright, and version information\n\n");
printout(LOG_INFO," -h, -?, --help, --usage\n Display this help and exit\n\n");
#else
printout(LOG_INFO,"Usage: smartd [-XVh]\n\n");
printout(LOG_INFO,"Command Line Options:\n");
printout(LOG_INFO," -X Start smartd in debug mode\n");
printout(LOG_INFO," -V Print License, Copyright, and version information\n");
printout(LOG_INFO," -h Display this help and exit\n");
printout(LOG_INFO," -? Same as -h\n");
#endif
printout(LOG_INFO,"\n");
printout(LOG_INFO,"Optional configuration file: %s\n",CONFIGFILE);
Directives();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment