From d09c5346d23400237ad21a9b95d3ac39b3b45910 Mon Sep 17 00:00:00 2001
From: pjwilliams <pjwilliams@4ea69e1a-61f1-4043-bf83-b5c94c648137>
Date: Thu, 5 Dec 2002 23:10:10 +0000
Subject: [PATCH] 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
---
 sm5/smartd.c   | 11 ++++++++++-
 sm5/smartd.cpp | 11 ++++++++++-
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/sm5/smartd.c b/sm5/smartd.c
index 9d4c42cc9..6131de84b 100644
--- a/sm5/smartd.c
+++ b/sm5/smartd.c
@@ -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();
diff --git a/sm5/smartd.cpp b/sm5/smartd.cpp
index 7f0517641..6bcafdeb5 100644
--- a/sm5/smartd.cpp
+++ b/sm5/smartd.cpp
@@ -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();
-- 
GitLab