diff --git a/sm5/CHANGELOG b/sm5/CHANGELOG index a04676d031f7feee743d8d0243f5e7111c5a5d0a..b940089512eece227e4e1508e0c0c6b76b720036 100644 --- a/sm5/CHANGELOG +++ b/sm5/CHANGELOG @@ -1,6 +1,6 @@ CHANGELOG for smartmontools -$Id: CHANGELOG,v 1.82 2003/01/04 19:34:29 pjwilliams Exp $ +$Id: CHANGELOG,v 1.83 2003/01/05 20:05:31 pjwilliams Exp $ Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net> @@ -36,6 +36,8 @@ CURRENT RELEASE (see VERSION file in this directory): smartmontools-5.1.1 + [PW] Added "help" argument to -v for smartctl + [PW] Added -D, --showdirectives option to smartd [DG] add '-l selftest' capability for SCSI devices (update smartctl.8) diff --git a/sm5/smartctl.8 b/sm5/smartctl.8 index 0c57280afb80c3e009788d17f55eb3991e4fabc8..92bf7e6d6c1db644805cce090b6abb31fc3702ab 100644 --- a/sm5/smartctl.8 +++ b/sm5/smartctl.8 @@ -1,6 +1,6 @@ \# Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net> \# -\# $Id: smartctl.8,v 1.41 2003/01/05 06:02:36 ballen4705 Exp $ +\# $Id: smartctl.8,v 1.42 2003/01/05 20:05:32 pjwilliams Exp $ \# \# This program is free software; you can redistribute it and/or modify it \# under the terms of the GNU General Public License as published by the Free @@ -16,7 +16,7 @@ \# Research Center), Jack Baskin School of Engineering, University of \# California, Santa Cruz. http://ssrc.soe.ucsc.edu/ \# -.TH SMARTCTL 8 "$Date: 2003/01/05 06:02:36 $" "smartmontools-5.1" +.TH SMARTCTL 8 "$Date: 2003/01/05 20:05:32 $" "smartmontools-5.1" .SH NAME smartctl \- S.M.A.R.T. control and monitor utility .SH SYNOPSIS @@ -407,6 +407,9 @@ run using the '\-t' option described below (use ATA's test terminology). Sets a vendor-specific display OPTION for Attribute N. Valid arguments to this option are: +.I help +\- Prints (to STDOUT) a list of all valid arguments to this option. + .I 9,minutes \- Raw Attribute number 9 is power-on time in minutes. It will be displayed in the form 'X h + Y m', where X is hours and Y is minutes. @@ -665,4 +668,4 @@ Please let us know if there is an on\-line source for this document. .SH CVS ID OF THIS PAGE: -$Id: smartctl.8,v 1.41 2003/01/05 06:02:36 ballen4705 Exp $ +$Id: smartctl.8,v 1.42 2003/01/05 20:05:32 pjwilliams Exp $ diff --git a/sm5/smartctl.c b/sm5/smartctl.c index f70dd243331a4fba70585a95b2854eeaebfb083f..66bdb47b53d85b2d74447107585c99252b5f2f20 100644 --- a/sm5/smartctl.c +++ b/sm5/smartctl.c @@ -42,7 +42,7 @@ #include "extern.h" extern const char *CVSid1, *CVSid2, *CVSid3, *CVSid4; -const char* CVSid5="$Id: smartctl.c,v 1.42 2003/01/05 09:00:40 ballen4705 Exp $" +const char* CVSid5="$Id: smartctl.c,v 1.43 2003/01/05 20:05:32 pjwilliams Exp $" CVSID1 CVSID2 CVSID3 CVSID4 CVSID5 CVSID6; // This is a block containing all the "control variables". We declare @@ -230,7 +230,7 @@ void printbadargmessage(int opt, const char *optarg) { pout("\nInsufficient memory to construct argument list\n"); break; } - pout("%s", s); + pout("\"help\", %s", s); free(s); break; case 't': @@ -413,6 +413,18 @@ void ParseOpts (int argc, char** argv){ break; case 'v': // parse vendor-specific definitions of attributes + if (!strcmp(optarg,"help")) { + char *s; + con->veryquietmode=FALSE; + printslogan(); + if (!(s = create_vendor_attribute_arg_list())) { + pout("Insufficient memory to construct argument list\n"); + exit(FAILCMD); + } + pout("The valid arguments to -v are: \"help\", %s\n", s); + free(s); + exit(0); + } if (parse_attribute_def(optarg, con->attributedefs)) badarg = TRUE; break; diff --git a/sm5/smartctl.cpp b/sm5/smartctl.cpp index 9d1f58c0a6c0c3527cd05a0de545e172ace826b9..c38e5a4f0b759f3951addec173ce19deaa1f69f1 100644 --- a/sm5/smartctl.cpp +++ b/sm5/smartctl.cpp @@ -42,7 +42,7 @@ #include "extern.h" extern const char *CVSid1, *CVSid2, *CVSid3, *CVSid4; -const char* CVSid5="$Id: smartctl.cpp,v 1.42 2003/01/05 09:00:40 ballen4705 Exp $" +const char* CVSid5="$Id: smartctl.cpp,v 1.43 2003/01/05 20:05:32 pjwilliams Exp $" CVSID1 CVSID2 CVSID3 CVSID4 CVSID5 CVSID6; // This is a block containing all the "control variables". We declare @@ -230,7 +230,7 @@ void printbadargmessage(int opt, const char *optarg) { pout("\nInsufficient memory to construct argument list\n"); break; } - pout("%s", s); + pout("\"help\", %s", s); free(s); break; case 't': @@ -413,6 +413,18 @@ void ParseOpts (int argc, char** argv){ break; case 'v': // parse vendor-specific definitions of attributes + if (!strcmp(optarg,"help")) { + char *s; + con->veryquietmode=FALSE; + printslogan(); + if (!(s = create_vendor_attribute_arg_list())) { + pout("Insufficient memory to construct argument list\n"); + exit(FAILCMD); + } + pout("The valid arguments to -v are: \"help\", %s\n", s); + free(s); + exit(0); + } if (parse_attribute_def(optarg, con->attributedefs)) badarg = TRUE; break;