Skip to content
Snippets Groups Projects
Commit 496c3c91 authored by pjwilliams's avatar pjwilliams
Browse files

Added "help" argument to -v for smartctl

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@432 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent fb0c634b
No related branches found
No related tags found
No related merge requests found
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)
......
\# 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 $
......@@ -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;
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment