Skip to content
Snippets Groups Projects
Commit 874227f6 authored by dpgilbert's avatar dpgilbert
Browse files

a little saner handling of TapeAlerts

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@688 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent bd8508e5
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@
#define GBUF_SIZE 65535
const char* scsiprint_c_cvsid="$Id: scsiprint.c,v 1.36 2003/04/18 00:12:09 dpgilbert Exp $"
const char* scsiprint_c_cvsid="$Id: scsiprint.c,v 1.37 2003/04/21 10:44:07 dpgilbert Exp $"
EXTERN_H_CVSID SCSICMDS_H_CVSID SCSIPRINT_H_CVSID SMARTCTL_H_CVSID UTILITY_H_CVSID;
// control block which points to external global control variables
......@@ -129,7 +129,7 @@ void scsiGetTapeAlertsData(int device)
int failure = 0;
if ((err = scsiLogSense(device, TAPE_ALERTS_PAGE, gBuf, LOG_RESP_LEN))) {
pout("scsiGetSmartData Failed [%s]\n", scsiErrString(err));
pout("scsiGetTapesAlertData Failed [%s]\n", scsiErrString(err));
return;
}
if (gBuf[0] != 0x2e) {
......@@ -547,9 +547,14 @@ void scsiPrintMain(const char *dev_name, int fd)
if (con->checksmart) {
scsiGetSupportedLogPages(fd);
checkedSupportedLogPages = 1;
if (1 == peripheral_type) { /* tape device */
if (gTapeAlertsPage)
scsiGetTapeAlertsData(fd);
else {
if (gTempPage)
scsiPrintTemp(fd);
if (gStartStopPage)
scsiGetStartStopData(fd);
} else { /* disk, cd/dvd, enclosure, etc */
scsiGetSmartData(fd);
if (gTempPage)
scsiPrintTemp(fd);
......
......@@ -40,7 +40,7 @@
#define GBUF_SIZE 65535
const char* scsiprint_c_cvsid="$Id: scsiprint.cpp,v 1.36 2003/04/18 00:12:09 dpgilbert Exp $"
const char* scsiprint_c_cvsid="$Id: scsiprint.cpp,v 1.37 2003/04/21 10:44:07 dpgilbert Exp $"
EXTERN_H_CVSID SCSICMDS_H_CVSID SCSIPRINT_H_CVSID SMARTCTL_H_CVSID UTILITY_H_CVSID;
// control block which points to external global control variables
......@@ -129,7 +129,7 @@ void scsiGetTapeAlertsData(int device)
int failure = 0;
if ((err = scsiLogSense(device, TAPE_ALERTS_PAGE, gBuf, LOG_RESP_LEN))) {
pout("scsiGetSmartData Failed [%s]\n", scsiErrString(err));
pout("scsiGetTapesAlertData Failed [%s]\n", scsiErrString(err));
return;
}
if (gBuf[0] != 0x2e) {
......@@ -547,9 +547,14 @@ void scsiPrintMain(const char *dev_name, int fd)
if (con->checksmart) {
scsiGetSupportedLogPages(fd);
checkedSupportedLogPages = 1;
if (1 == peripheral_type) { /* tape device */
if (gTapeAlertsPage)
scsiGetTapeAlertsData(fd);
else {
if (gTempPage)
scsiPrintTemp(fd);
if (gStartStopPage)
scsiGetStartStopData(fd);
} else { /* disk, cd/dvd, enclosure, etc */
scsiGetSmartData(fd);
if (gTempPage)
scsiPrintTemp(fd);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment