Skip to content
Snippets Groups Projects
Commit 59d510e5 authored by dpgilbert's avatar dpgilbert
Browse files

Pass in mode sense cmd length to mode page fetching commands

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@1228 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 63a3632a
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#ifndef SCSICMDS_H_ #ifndef SCSICMDS_H_
#define SCSICMDS_H_ #define SCSICMDS_H_
#define SCSICMDS_H_CVSID "$Id: scsicmds.h,v 1.36 2003/11/13 07:39:09 dpgilbert Exp $\n" #define SCSICMDS_H_CVSID "$Id: scsicmds.h,v 1.37 2003/11/14 11:40:59 dpgilbert Exp $\n"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -120,7 +120,7 @@ struct scsi_iec_mode_page { ...@@ -120,7 +120,7 @@ struct scsi_iec_mode_page {
UINT8 gotCurrent; UINT8 gotCurrent;
UINT8 requestedChangeable; UINT8 requestedChangeable;
UINT8 gotChangeable; UINT8 gotChangeable;
UINT8 modese_10; UINT8 modese_len; /* 0 (don't know), 6 or 10 */
UINT8 raw_curr[SCSI_IECMP_RAW_LEN]; UINT8 raw_curr[SCSI_IECMP_RAW_LEN];
UINT8 raw_chg[SCSI_IECMP_RAW_LEN]; UINT8 raw_chg[SCSI_IECMP_RAW_LEN];
}; };
...@@ -275,7 +275,7 @@ int scsiModeSense10(int device, int pagenum, int pc, UINT8 *pBuf, int bufLen); ...@@ -275,7 +275,7 @@ int scsiModeSense10(int device, int pagenum, int pc, UINT8 *pBuf, int bufLen);
int scsiModeSelect10(int device, int pagenum, int sp, UINT8 *pBuf, int bufLen); int scsiModeSelect10(int device, int pagenum, int sp, UINT8 *pBuf, int bufLen);
int scsiModePageOffset(const UINT8 * resp, int len, int modese_10); int scsiModePageOffset(const UINT8 * resp, int len, int modese_len);
int scsiRequestSense(int device, struct scsi_sense_disect * sense_info); int scsiRequestSense(int device, struct scsi_sense_disect * sense_info);
...@@ -285,10 +285,11 @@ int scsiReceiveDiagnostic(int device, int pcv, int pagenum, UINT8 *pBuf, ...@@ -285,10 +285,11 @@ int scsiReceiveDiagnostic(int device, int pcv, int pagenum, UINT8 *pBuf,
int bufLen); int bufLen);
/* SMART specific commands */ /* SMART specific commands */
int scsiCheckIE(int device, int hasIELogPage, int hasTempLogPage, int scsiCheckIE(int device, int hasIELogPage, int hasTempLogPage, UINT8 *asc,
UINT8 *asc, UINT8 *ascq, UINT8 *currenttemp); UINT8 *ascq, UINT8 *currenttemp, UINT8 *triptemp);
int scsiFetchIECmpage(int device, struct scsi_iec_mode_page *iecp); int scsiFetchIECmpage(int device, struct scsi_iec_mode_page *iecp,
int modese_len);
int scsi_IsExceptionControlEnabled(const struct scsi_iec_mode_page *iecp); int scsi_IsExceptionControlEnabled(const struct scsi_iec_mode_page *iecp);
int scsi_IsWarningEnabled(const struct scsi_iec_mode_page *iecp); int scsi_IsWarningEnabled(const struct scsi_iec_mode_page *iecp);
int scsiSetExceptionControlAndWarning(int device, int enabled, int scsiSetExceptionControlAndWarning(int device, int enabled,
...@@ -297,7 +298,7 @@ void scsiDecodeErrCounterPage(unsigned char * resp, ...@@ -297,7 +298,7 @@ void scsiDecodeErrCounterPage(unsigned char * resp,
struct scsiErrorCounter *ecp); struct scsiErrorCounter *ecp);
void scsiDecodeNonMediumErrPage(unsigned char * resp, void scsiDecodeNonMediumErrPage(unsigned char * resp,
struct scsiNonMediumError *nmep); struct scsiNonMediumError *nmep);
int scsiFetchExtendedSelfTestTime(int device, int * durationSec); int scsiFetchExtendedSelfTestTime(int device, int * durationSec, int modese_len);
int scsiCountFailedSelfTests(int fd, int noisy); int scsiCountFailedSelfTests(int fd, int noisy);
/* T10 Standard IE Additional Sense Code strings taken from t10.org */ /* T10 Standard IE Additional Sense Code strings taken from t10.org */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment