]> git.proxmox.com Git - mirror_smartmontools-debian.git/blame - os_os2.h
import smartmontools 7.0
[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 7 *
ff28b140 8 * SPDX-License-Identifier: GPL-2.0-or-later
a23d5117
GI
9 */
10
11#ifndef OS_OS2_H_
12#define OS_OS2_H_
13
ff28b140 14#define OS_XXXX_H_CVSID "$Id: os_os2.h 4760 2018-08-19 18:45:53Z chrfranke $\n"
a23d5117
GI
15
16// Additional material should start here. Note: to keep the '-V' CVS
17// reporting option working as intended, you should only #include
18// system include files <something.h>. Local #include files
19// <"something.h"> should be #included in os_generic.c
20
21#define INCL_DOS
22#include <os2.h>
23
a23d5117
GI
24#include "os_linux.h"
25
26#pragma pack(1)
27
f9e10201 28/* IOCTL definitions from s506oem.h (primarily required for SMART calls) */
a23d5117
GI
29#define DSKSP_CAT_SMART 0x80 /* SMART IOCTL category */
30#define DSKSP_SMART_ONOFF 0x20 /* turn SMART on or off */
31#define DSKSP_SMART_AUTOSAVE_ONOFF 0x21 /* turn SMART autosave on or off */
32#define DSKSP_SMART_SAVE 0x22 /* force save of SMART data */
33#define DSKSP_SMART_GETSTATUS 0x23 /* get SMART status (pass/fail) */
34#define DSKSP_SMART_GET_ATTRIBUTES 0x24 /* get SMART attributes table */
35#define DSKSP_SMART_GET_THRESHOLDS 0x25 /* get SMART thresholds table */
f9e10201
JD
36#define DSKSP_SMART_GET_LOG 0x26 /* get SMART log table */
37#define DSKSP_SMART_AUTO_OFFLINE 0x27 /* set SMART offline autosave timer */
38#define DSKSP_SMART_EXEC_OFFLINE 0x28 /* execute SMART immediate offline */
a23d5117
GI
39
40#define SMART_CMD_ON 1 /* on value for related SMART functions */
41#define SMART_CMD_OFF 0 /* off value for related SMART functions */
42
43#define DSKSP_CAT_GENERIC 0x90 /* generic IOCTL category */
44#define DSKSP_GET_INQUIRY_DATA 0x42 /* get ATA/ATAPI inquiry data */
45
46typedef struct _DSKSP_CommandParameters {
47 BYTE byPhysicalUnit; /* physical unit number 0-n */
48 /* 0 = 1st disk, 1 = 2nd disk, ...*/
49 /* 0x80 = Pri/Mas, 0x81=Pri/Sla, 0x82=Sec/Mas,*/
50} DSKSP_CommandParameters, *PDSKSP_CommandParameters;
51
52struct SMART_ParamExt {
53 UCHAR byPhysicalUnit; // 0=Pri/Mas, 1=Pri/Sla, 2=Sec/Mas, etc.
54 ULONG LogAddress; // valid values 0-255. See ATA/ATPI standard
55 // for details
56 ULONG SectorCount; // valid values 0-255 See ATA/ATPI standard
57 // for details
58 ULONG reserved; // reserved. must be set to 0
59};
60
f9e10201
JD
61const char * danisdev="\\DEV\\IBMS506$"; // DANIS506
62const char * danispref="hd";
63const char * ahcidev="\\DEV\\OS2AHCI$"; // OS2AHCI
64const char * ahcipref="ahci";
65
a23d5117 66#endif /* OS_GENERIC_H_ */