ps2sdk
1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
ioctl.h
Go to the documentation of this file.
1
/*
2
# _____ ___ ____ ___ ____
3
# ____| | ____| | | |____|
4
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5
#-----------------------------------------------------------------------
6
# Copyright (c) 2003 Marcus R. Brown <mrbrown@0xd6.org>
7
# Licenced under Academic Free License version 2.0
8
# Review ps2sdk README & LICENSE files for further details.
9
*/
10
16
#ifndef __SYS_IOCTL_H__
17
#define __SYS_IOCTL_H__
18
19
#include <
tamtypes.h
>
20
21
#define _IOC(type, nr) (((type) << 8)|(nr))
22
23
#define HDD_IOC_TYPE 'H'
24
#define HDD_CTL_TYPE 'h'
25
26
/* hddfsd ioctl2(). */
28
#define HDDIOCADDSUB _IOC(HDD_IOC_TYPE, 1)
30
#define HDDIOCDELSUB _IOC(HDD_IOC_TYPE, 2)
32
#define HDDIOCGETSUBS _IOC(HDD_IOC_TYPE, 3)
33
35
#define HDDIOCFLUSH _IOC(HDD_IOC_TYPE, 4)
36
37
typedef
struct
{
39
u32
sub
;
41
u32
lba
;
43
u32
nsectors
;
45
int
dir
;
47
void
*
buf
;
48
}
hdd_ioc_devio_t
;
49
51
#define HDDIOCDEVIO _IOC(HDD_IOC_TYPE, 50)
52
54
#define HDDIOCGETSIZE _IOC(HDD_IOC_TYPE, 51)
56
#define HDDIOCSETERROR _IOC(HDD_IOC_TYPE, 52)
58
#define HDDIOCGETERROR _IOC(HDD_IOC_TYPE, 53)
59
60
/* hddfsd devctl(). */
62
#define HDDCTLGETMAXSECT _IOC(HDD_CTL_TYPE, 1)
64
#define HDDCTLGETTOTALSECT _IOC(HDD_CTL_TYPE, 2)
66
#define HDDCTLSETIDLE _IOC(HDD_CTL_TYPE, 3)
68
#define HDDCTLFLUSH _IOC(HDD_CTL_TYPE, 4)
70
#define HDDCTLSWAPTMP _IOC(HDD_CTL_TYPE, 5)
72
#define HDDCTLSHUTDOWN _IOC(HDD_CTL_TYPE, 6)
74
#define HDDCTLGETSTATUS _IOC(HDD_CTL_TYPE, 7)
76
#define HDDCTLGETFMTVER _IOC(HDD_CTL_TYPE, 8)
78
#define HDDCTLGETSMARTSTAT _IOC(HDD_CTL_TYPE, 9)
79
80
/* hddfsd extended devctl(). */
82
#define HDDCTLGETDATE _IOC(HDD_IOC_TYPE, 50)
84
#define HDDCTLINSTALLOSD _IOC(HDD_IOC_TYPE, 51)
86
#define HDDCTLGETERROR _IOC(HDD_IOC_TYPE, 52)
88
#define HDDCTLGETERRORID _IOC(HDD_IOC_TYPE, 53)
89
90
typedef
struct
{
91
u32
lba
;
92
u32
nsectors
;
93
u8
buf[0];
94
}
hdd_ctl_driveio_t
;
95
97
#define HDDCTLDRIVEREAD _IOC(HDD_IOC_TYPE, 54)
99
#define HDDCTLDRIVEWRITE _IOC(HDD_IOC_TYPE, 55)
101
#define HDDCTLSCEIDENTIFY _IOC(HDD_IOC_TYPE, 56)
102
103
#endif
/* __SYS_IOCTL_H__ */
hdd_ctl_driveio_t
Definition:
ioctl.h:90
hdd_ctl_driveio_t::lba
u32 lba
Definition:
ioctl.h:91
hdd_ctl_driveio_t::nsectors
u32 nsectors
Definition:
ioctl.h:92
hdd_ioc_devio_t
Definition:
ioctl.h:37
hdd_ioc_devio_t::sub
u32 sub
Definition:
ioctl.h:39
hdd_ioc_devio_t::nsectors
u32 nsectors
Definition:
ioctl.h:43
hdd_ioc_devio_t::dir
int dir
Definition:
ioctl.h:45
hdd_ioc_devio_t::buf
void * buf
Definition:
ioctl.h:47
hdd_ioc_devio_t::lba
u32 lba
Definition:
ioctl.h:41
tamtypes.h
u32
unsigned int u32
Definition:
tamtypes.h:30
u8
unsigned char u8
Definition:
tamtypes.h:23
common
include
sys
ioctl.h
Generated on Thu Feb 11 2021 11:42:21 for ps2sdk by
1.9.2