From 2f31b94d01c0d2e4c2888f072c576ddad7fc0421 Mon Sep 17 00:00:00 2001 From: ballen4705 <ballen4705@4ea69e1a-61f1-4043-bf83-b5c94c648137> Date: Tue, 22 Oct 2002 09:44:55 +0000 Subject: [PATCH] Modified version printing option to print CVS id of all files used in build. git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@77 4ea69e1a-61f1-4043-bf83-b5c94c648137 --- sm5/atacmds.c | 3 ++- sm5/atacmds.cpp | 3 ++- sm5/atacmds.h | 5 ++++- sm5/ataprint.c | 3 ++- sm5/ataprint.cpp | 3 ++- sm5/ataprint.h | 8 +++++--- sm5/extern.h | 6 +++++- sm5/scsicmds.c | 4 +--- sm5/scsicmds.cpp | 4 +--- sm5/scsicmds.h | 4 +++- sm5/scsiprint.c | 3 ++- sm5/scsiprint.cpp | 3 ++- sm5/scsiprint.h | 4 +++- sm5/smartctl.c | 6 ++++-- sm5/smartctl.cpp | 6 ++++-- sm5/smartctl.h | 5 ++++- sm5/smartd.c | 7 ++++--- sm5/smartd.cpp | 7 ++++--- sm5/smartd.h | 5 ++++- 19 files changed, 58 insertions(+), 31 deletions(-) diff --git a/sm5/atacmds.c b/sm5/atacmds.c index 15f447b9b..d0f3cb1e5 100644 --- a/sm5/atacmds.c +++ b/sm5/atacmds.c @@ -1,4 +1,3 @@ -// $Id: atacmds.c,v 1.15 2002/10/22 08:43:22 ballen4705 Exp $ /* * atacmds.c * @@ -31,6 +30,8 @@ #include <errno.h> #include "atacmds.h" +const char *CVSid1="$Id: atacmds.c,v 1.16 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID1 ; + // These Drive Identity tables are taken from hdparm 5.2, and are also // given in the ATA/ATAPI specs for the IDENTIFY DEVICE command. Note // that SMART was first added into the ATA/ATAPI-3 Standard with diff --git a/sm5/atacmds.cpp b/sm5/atacmds.cpp index 6982de9a8..42aa8ad71 100644 --- a/sm5/atacmds.cpp +++ b/sm5/atacmds.cpp @@ -1,4 +1,3 @@ -// $Id: atacmds.cpp,v 1.15 2002/10/22 08:43:22 ballen4705 Exp $ /* * atacmds.c * @@ -31,6 +30,8 @@ #include <errno.h> #include "atacmds.h" +const char *CVSid1="$Id: atacmds.cpp,v 1.16 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID1 ; + // These Drive Identity tables are taken from hdparm 5.2, and are also // given in the ATA/ATAPI specs for the IDENTIFY DEVICE command. Note // that SMART was first added into the ATA/ATAPI-3 Standard with diff --git a/sm5/atacmds.h b/sm5/atacmds.h index 6c207736c..c9995b9ac 100644 --- a/sm5/atacmds.h +++ b/sm5/atacmds.h @@ -1,4 +1,3 @@ -// $Id: atacmds.h,v 1.14 2002/10/21 16:45:22 ballen4705 Exp $ /* * atacmds.h * @@ -26,6 +25,10 @@ #ifndef _ATACMDS_H_ #define _ATACMDS_H_ +#ifndef CVSID1 +#define CVSID1 "$Id: atacmds.h,v 1.15 2002/10/22 09:44:55 ballen4705 Exp $\n" +#endif + // These are the major and minor versions for smartd and smartctl #define PROJECTHOME "http://smartmontools.sourceforge.net/" #define RELEASE_MAJOR 5 diff --git a/sm5/ataprint.c b/sm5/ataprint.c index 05d3fa84b..b510e1225 100644 --- a/sm5/ataprint.c +++ b/sm5/ataprint.c @@ -1,4 +1,3 @@ -// $Id: ataprint.c,v 1.14 2002/10/21 16:00:48 ballen4705 Exp $ /* * ataprint.c * @@ -29,6 +28,8 @@ #include "smartctl.h" #include "extern.h" +const char *CVSid4="$Id: ataprint.c,v 1.15 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID2 CVSID3 CVSID6 ; + // Function for printing ASCII byte-swapped strings, skipping white // space. This is needed on little-endian architectures, eg Intel, // Alpha. If someone wants to run this on SPARC they'll need to test diff --git a/sm5/ataprint.cpp b/sm5/ataprint.cpp index bfc6c5e07..b1975143d 100644 --- a/sm5/ataprint.cpp +++ b/sm5/ataprint.cpp @@ -1,4 +1,3 @@ -// $Id: ataprint.cpp,v 1.14 2002/10/21 16:00:48 ballen4705 Exp $ /* * ataprint.c * @@ -29,6 +28,8 @@ #include "smartctl.h" #include "extern.h" +const char *CVSid4="$Id: ataprint.cpp,v 1.15 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID2 CVSID3 CVSID6 ; + // Function for printing ASCII byte-swapped strings, skipping white // space. This is needed on little-endian architectures, eg Intel, // Alpha. If someone wants to run this on SPARC they'll need to test diff --git a/sm5/ataprint.h b/sm5/ataprint.h index 2184b5191..6564e8973 100644 --- a/sm5/ataprint.h +++ b/sm5/ataprint.h @@ -1,7 +1,5 @@ -// $Id: ataprint.h,v 1.6 2002/10/20 19:22:02 ballen4705 Exp $ - /* - * ataprint.c + * ataprint.h * * Home page of code is: http://smartmontools.sourceforge.net * @@ -27,6 +25,10 @@ #ifndef _SMART_PRINT_H_ #define _SMART_PRINT_H_ +#ifndef CVSID2 +#define CVSID2 "$Id: ataprint.h,v 1.7 2002/10/22 09:44:55 ballen4705 Exp $\n" +#endif + #include <stdio.h> #include <stdlib.h> #include "atacmds.h" diff --git a/sm5/extern.h b/sm5/extern.h index a49096f4f..0d50f2705 100644 --- a/sm5/extern.h +++ b/sm5/extern.h @@ -1,4 +1,3 @@ -// $Id: extern.h,v 1.6 2002/10/20 19:22:02 ballen4705 Exp $ /* * extern.h * @@ -26,6 +25,11 @@ #ifndef _EXTERN_H_ #define _EXTERN_H_ + +#ifndef CVSID3 +#define CVSID3 "$Id: extern.h,v 1.7 2002/10/22 09:44:55 ballen4705 Exp $\n" +#endif + extern unsigned char driveinfo; extern unsigned char checksmart; extern unsigned char smartvendorattrib; diff --git a/sm5/scsicmds.c b/sm5/scsicmds.c index e2c276f09..3f3dc2f13 100644 --- a/sm5/scsicmds.c +++ b/sm5/scsicmds.c @@ -1,5 +1,3 @@ -// $Id: scsicmds.c,v 1.8 2002/10/22 08:43:22 ballen4705 Exp $ - /* * scsicmds.c * @@ -35,7 +33,7 @@ #include <scsi/scsi.h> #include "scsicmds.h" - +const char *CVSid2="$Id: scsicmds.c,v 1.9 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID4 ; UINT8 logsense (int device, UINT8 pagenum, UINT8 *pBuf) diff --git a/sm5/scsicmds.cpp b/sm5/scsicmds.cpp index d8fa1eb48..d5eb436b1 100644 --- a/sm5/scsicmds.cpp +++ b/sm5/scsicmds.cpp @@ -1,5 +1,3 @@ -// $Id: scsicmds.cpp,v 1.8 2002/10/22 08:43:22 ballen4705 Exp $ - /* * scsicmds.c * @@ -35,7 +33,7 @@ #include <scsi/scsi.h> #include "scsicmds.h" - +const char *CVSid2="$Id: scsicmds.cpp,v 1.9 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID4 ; UINT8 logsense (int device, UINT8 pagenum, UINT8 *pBuf) diff --git a/sm5/scsicmds.h b/sm5/scsicmds.h index 7843da88c..8e1a3e910 100644 --- a/sm5/scsicmds.h +++ b/sm5/scsicmds.h @@ -1,4 +1,3 @@ -// $Id: scsicmds.h,v 1.6 2002/10/22 08:43:22 ballen4705 Exp $ /* * scsicmds.h * @@ -27,6 +26,9 @@ #ifndef SCSICMDS_H_ #define SCSICMDS_H_ +#ifndef CVSID4 +#define CVSID4 "$Id: scsicmds.h,v 1.7 2002/10/22 09:44:55 ballen4705 Exp $\n" +#endif #ifndef LOG_SENSE #define LOG_SENSE 0x4d diff --git a/sm5/scsiprint.c b/sm5/scsiprint.c index 140285eae..c965f22e6 100644 --- a/sm5/scsiprint.c +++ b/sm5/scsiprint.c @@ -1,4 +1,3 @@ -// $Id: scsiprint.c,v 1.6 2002/10/15 14:24:27 ballen4705 Exp $ /* * scsiprint.c * @@ -37,6 +36,8 @@ #define GBUF_SIZE 65535 +const char* CVSid5="$Id: scsiprint.c,v 1.7 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID3 CVSID4 CVSID5 CVSID6 ; + UINT8 gBuf[GBUF_SIZE]; UINT8 gSmartPage = 0; diff --git a/sm5/scsiprint.cpp b/sm5/scsiprint.cpp index fb8bc0099..3fd441441 100644 --- a/sm5/scsiprint.cpp +++ b/sm5/scsiprint.cpp @@ -1,4 +1,3 @@ -// $Id: scsiprint.cpp,v 1.6 2002/10/15 14:24:27 ballen4705 Exp $ /* * scsiprint.c * @@ -37,6 +36,8 @@ #define GBUF_SIZE 65535 +const char* CVSid5="$Id: scsiprint.cpp,v 1.7 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID3 CVSID4 CVSID5 CVSID6 ; + UINT8 gBuf[GBUF_SIZE]; UINT8 gSmartPage = 0; diff --git a/sm5/scsiprint.h b/sm5/scsiprint.h index d2625f4eb..07b02c0f7 100644 --- a/sm5/scsiprint.h +++ b/sm5/scsiprint.h @@ -1,4 +1,3 @@ -// $Id: scsiprint.h,v 1.5 2002/10/15 14:24:27 ballen4705 Exp $ /* * scsiprint.h * @@ -28,6 +27,9 @@ #ifndef SCSI_PRINT_H_ #define SCSI_PRINT_H_ +#ifndef CVSID5 +#define CVSID5 "$Id: scsiprint.h,v 1.6 2002/10/22 09:44:55 ballen4705 Exp $\n" +#endif void scsiPrintMain (int fd); diff --git a/sm5/smartctl.c b/sm5/smartctl.c index 5f94abe9e..b619b2306 100644 --- a/sm5/smartctl.c +++ b/sm5/smartctl.c @@ -1,4 +1,3 @@ -// $Id: smartctl.c,v 1.11 2002/10/21 08:49:23 ballen4705 Exp $ /* * smartctl.c * @@ -37,6 +36,9 @@ #include "scsicmds.h" #include "scsiprint.h" +extern const char *CVSid1, *CVSid2, *CVSid4, *CVSid5; +const char* CVSid6="$Id: smartctl.c,v 1.12 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID1 CVSID2 CVSID4 CVSID5 CVSID6 ; + unsigned char driveinfo = FALSE; unsigned char checksmart = FALSE; unsigned char smartvendorattrib = FALSE; @@ -229,7 +231,7 @@ int main (int argc, char **argv){ printf("is free software, and you are welcome to redistribute it\n"); printf("under the terms of the GNU General Public License Version 2.\n"); printf("See http://www.gnu.org for further details.\n\n"); - printf("CVS version ID %s\n","$Id: smartctl.c,v 1.11 2002/10/21 08:49:23 ballen4705 Exp $"); + printf("CVS version IDs of files used to build this code are:\n%s%s%s%s%s",CVSid1,CVSid2,CVSid4,CVSid5,CVSid6); if (argc==2) exit(0); } diff --git a/sm5/smartctl.cpp b/sm5/smartctl.cpp index 407eb7a8f..af444f0a0 100644 --- a/sm5/smartctl.cpp +++ b/sm5/smartctl.cpp @@ -1,4 +1,3 @@ -// $Id: smartctl.cpp,v 1.11 2002/10/21 08:49:23 ballen4705 Exp $ /* * smartctl.c * @@ -37,6 +36,9 @@ #include "scsicmds.h" #include "scsiprint.h" +extern const char *CVSid1, *CVSid2, *CVSid4, *CVSid5; +const char* CVSid6="$Id: smartctl.cpp,v 1.12 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID1 CVSID2 CVSID4 CVSID5 CVSID6 ; + unsigned char driveinfo = FALSE; unsigned char checksmart = FALSE; unsigned char smartvendorattrib = FALSE; @@ -229,7 +231,7 @@ int main (int argc, char **argv){ printf("is free software, and you are welcome to redistribute it\n"); printf("under the terms of the GNU General Public License Version 2.\n"); printf("See http://www.gnu.org for further details.\n\n"); - printf("CVS version ID %s\n","$Id: smartctl.cpp,v 1.11 2002/10/21 08:49:23 ballen4705 Exp $"); + printf("CVS version IDs of files used to build this code are:\n%s%s%s%s%s",CVSid1,CVSid2,CVSid4,CVSid5,CVSid6); if (argc==2) exit(0); } diff --git a/sm5/smartctl.h b/sm5/smartctl.h index 93586f0c8..d8ec2f2b2 100644 --- a/sm5/smartctl.h +++ b/sm5/smartctl.h @@ -1,4 +1,3 @@ -// $Id: smartctl.h,v 1.6 2002/10/15 14:24:27 ballen4705 Exp $ /* * smartctl.h * @@ -26,6 +25,10 @@ #ifndef __SMARTCTL_H_ #define __SMARTCTL_H_ +#ifndef CVSID6 +#define CVSID6 "$Id: smartctl.h,v 1.7 2002/10/22 09:44:55 ballen4705 Exp $\n" +#endif + /* Defines for command line options */ #define DRIVEINFO 'i' #define CHECKSMART 'c' diff --git a/sm5/smartd.c b/sm5/smartd.c index b593fbcb9..48e152ce1 100644 --- a/sm5/smartd.c +++ b/sm5/smartd.c @@ -1,4 +1,3 @@ -// $Id: smartd.c,v 1.10 2002/10/20 19:22:02 ballen4705 Exp $ /* * smartd.c * @@ -38,6 +37,8 @@ #include "scsicmds.h" #include "smartd.h" +extern const char *CVSid1, *CVSid2; +const char *CVSid3="$Id: smartd.c,v 1.11 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID1 CVSID4 CVSID7 ; int daemon_init(void){ pid_t pid; @@ -277,8 +278,7 @@ char copyleftstring[]= "smartd comes with ABSOLUTELY NO WARRANTY. This\n" "is free software, and you are welcome to redistribute it\n" "under the terms of the GNU General Public License Version 2.\n" -"See http://www.gnu.org for further details.\n\n" -"CVS Version ID $Id: smartd.c,v 1.10 2002/10/20 19:22:02 ballen4705 Exp $\n"; +"See http://www.gnu.org for further details.\n\n"; const char opts[] = { DEBUGMODE, EMAILNOTIFICATION, PRINTCOPYLEFT,'\0' }; @@ -321,6 +321,7 @@ int main (int argc, char **argv){ printout(LOG_INFO,"smartd version %d.%d-%d Copyright (C) Bruce Allen 2002\n", RELEASE_MAJOR,RELEASE_MINOR,SMARTMONTOOLS_VERSION); printout(LOG_INFO,copyleftstring); + printout(LOG_INFO,"CVS version IDs of files used to build this code are:\n%s%s%s",CVSid1,CVSid2,CVSid3); exit(0); } diff --git a/sm5/smartd.cpp b/sm5/smartd.cpp index ce1aa9ff2..4ae422fca 100644 --- a/sm5/smartd.cpp +++ b/sm5/smartd.cpp @@ -1,4 +1,3 @@ -// $Id: smartd.cpp,v 1.10 2002/10/20 19:22:02 ballen4705 Exp $ /* * smartd.c * @@ -38,6 +37,8 @@ #include "scsicmds.h" #include "smartd.h" +extern const char *CVSid1, *CVSid2; +const char *CVSid3="$Id: smartd.cpp,v 1.11 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID1 CVSID4 CVSID7 ; int daemon_init(void){ pid_t pid; @@ -277,8 +278,7 @@ char copyleftstring[]= "smartd comes with ABSOLUTELY NO WARRANTY. This\n" "is free software, and you are welcome to redistribute it\n" "under the terms of the GNU General Public License Version 2.\n" -"See http://www.gnu.org for further details.\n\n" -"CVS Version ID $Id: smartd.cpp,v 1.10 2002/10/20 19:22:02 ballen4705 Exp $\n"; +"See http://www.gnu.org for further details.\n\n"; const char opts[] = { DEBUGMODE, EMAILNOTIFICATION, PRINTCOPYLEFT,'\0' }; @@ -321,6 +321,7 @@ int main (int argc, char **argv){ printout(LOG_INFO,"smartd version %d.%d-%d Copyright (C) Bruce Allen 2002\n", RELEASE_MAJOR,RELEASE_MINOR,SMARTMONTOOLS_VERSION); printout(LOG_INFO,copyleftstring); + printout(LOG_INFO,"CVS version IDs of files used to build this code are:\n%s%s%s",CVSid1,CVSid2,CVSid3); exit(0); } diff --git a/sm5/smartd.h b/sm5/smartd.h index 88de27053..40eeb79c6 100644 --- a/sm5/smartd.h +++ b/sm5/smartd.h @@ -1,4 +1,3 @@ -// $Id: smartd.h,v 1.5 2002/10/15 14:24:27 ballen4705 Exp $ /* * smartd.h * @@ -23,6 +22,10 @@ * */ +#ifndef CVSID7 +#define CVSID7 "$Id: smartd.h,v 1.6 2002/10/22 09:44:55 ballen4705 Exp $\n" +#endif + /* Defines for command line options */ #define DEBUGMODE 'X' #define EMAILNOTIFICATION 'e' -- GitLab