]> git.proxmox.com Git - mirror_smartmontools-debian.git/blame - os_os2.h
New upstream version 6.6
[mirror_smartmontools-debian.git] / os_os2.h
CommitLineData
a23d5117
GI
1/*
2 * os_os2.c
3 *
a86ec89e 4 * Home page of code is: http://www.smartmontools.org
a23d5117 5 *
f9e10201 6 * Copyright (C) 2004-8 Yuri Dario
a23d5117
GI
7 *
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)
11 * any later version.
12 *
13 * You should have received a copy of the GNU General Public License
ee38a438
GI
14 * (for example COPYING); if not, write to the Free Software Foundation,
15 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
a23d5117
GI
16 */
17
18#ifndef OS_OS2_H_
19#define OS_OS2_H_
20
f9e10201 21#define OS_XXXX_H_CVSID "$Id: os_os2.h 4431 2017-08-08 19:38:15Z chrfranke $\n"
a23d5117
GI
22
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
27
28#define INCL_DOS
29#include <os2.h>
30
a23d5117
GI
31#include "os_linux.h"
32
33#pragma pack(1)
34
f9e10201 35/* IOCTL definitions from s506oem.h (primarily required for SMART calls) */
a23d5117
GI
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 */
f9e10201
JD
43#define DSKSP_SMART_GET_LOG 0x26 /* get SMART log table */
44#define DSKSP_SMART_AUTO_OFFLINE 0x27 /* set SMART offline autosave timer */
45#define DSKSP_SMART_EXEC_OFFLINE 0x28 /* execute SMART immediate offline */
a23d5117
GI
46
47#define SMART_CMD_ON 1 /* on value for related SMART functions */
48#define SMART_CMD_OFF 0 /* off value for related SMART functions */
49
50#define DSKSP_CAT_GENERIC 0x90 /* generic IOCTL category */
51#define DSKSP_GET_INQUIRY_DATA 0x42 /* get ATA/ATAPI inquiry data */
52
53typedef struct _DSKSP_CommandParameters {
54 BYTE byPhysicalUnit; /* physical unit number 0-n */
55 /* 0 = 1st disk, 1 = 2nd disk, ...*/
56 /* 0x80 = Pri/Mas, 0x81=Pri/Sla, 0x82=Sec/Mas,*/
57} DSKSP_CommandParameters, *PDSKSP_CommandParameters;
58
59struct SMART_ParamExt {
60 UCHAR byPhysicalUnit; // 0=Pri/Mas, 1=Pri/Sla, 2=Sec/Mas, etc.
61 ULONG LogAddress; // valid values 0-255. See ATA/ATPI standard
62 // for details
63 ULONG SectorCount; // valid values 0-255 See ATA/ATPI standard
64 // for details
65 ULONG reserved; // reserved. must be set to 0
66};
67
f9e10201
JD
68const char * danisdev="\\DEV\\IBMS506$"; // DANIS506
69const char * danispref="hd";
70const char * ahcidev="\\DEV\\OS2AHCI$"; // OS2AHCI
71const char * ahcipref="ahci";
72
a23d5117 73#endif /* OS_GENERIC_H_ */