4
* Home page of code is: http://smartmontools.sourceforge.net
6
* Copyright (C) 2004-8 Yuri Dario <smartmontools-support@lists.sourceforge.net>
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2, or (at your option)
13
* You should have received a copy of the GNU General Public License
14
* (for example COPYING); if not, write to the Free
15
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
#define OS_XXXX_H_CVSID "$Id: os_os2.h,v 1.5 2008/03/04 22:09:47 ballen4705 Exp $\n"
23
// Additional material should start here. Note: to keep the '-V' CVS
24
// reporting option working as intended, you should only #include
25
// system include files <something.h>. Local #include files
26
// <"something.h"> should be #included in os_generic.c
31
#include "os_os2\hdreg.h"
36
#define DSKSP_CAT_SMART 0x80 /* SMART IOCTL category */
37
#define DSKSP_SMART_ONOFF 0x20 /* turn SMART on or off */
38
#define DSKSP_SMART_AUTOSAVE_ONOFF 0x21 /* turn SMART autosave on or off */
39
#define DSKSP_SMART_SAVE 0x22 /* force save of SMART data */
40
#define DSKSP_SMART_GETSTATUS 0x23 /* get SMART status (pass/fail) */
41
#define DSKSP_SMART_GET_ATTRIBUTES 0x24 /* get SMART attributes table */
42
#define DSKSP_SMART_GET_THRESHOLDS 0x25 /* get SMART thresholds table */
43
#define DSKSP_SMART_READ_LOG 0x26
44
#define DSKSP_SMART_WRITE_LOG 0x27
45
#define DSKSP_SMART_READ_LOG_EXT 0x28
46
#define DSKSP_SMART_WRITE_LOG_EXT 0x29
47
#define DSKSP_SMART_EOLI 0x30 /* EXECUTE OFF-LINE IMMEDIATE */
49
#define SMART_CMD_ON 1 /* on value for related SMART functions */
50
#define SMART_CMD_OFF 0 /* off value for related SMART functions */
52
#define DSKSP_CAT_GENERIC 0x90 /* generic IOCTL category */
53
#define DSKSP_GET_INQUIRY_DATA 0x42 /* get ATA/ATAPI inquiry data */
55
typedef struct _DSKSP_CommandParameters {
56
BYTE byPhysicalUnit; /* physical unit number 0-n */
57
/* 0 = 1st disk, 1 = 2nd disk, ...*/
58
/* 0x80 = Pri/Mas, 0x81=Pri/Sla, 0x82=Sec/Mas,*/
59
} DSKSP_CommandParameters, *PDSKSP_CommandParameters;
61
struct SMART_ParamExt {
62
UCHAR byPhysicalUnit; // 0=Pri/Mas, 1=Pri/Sla, 2=Sec/Mas, etc.
63
ULONG LogAddress; // valid values 0-255. See ATA/ATPI standard
65
ULONG SectorCount; // valid values 0-255 See ATA/ATPI standard
67
ULONG reserved; // reserved. must be set to 0
70
#endif /* OS_GENERIC_H_ */