PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
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
38
{
40
u32
sub
;
42
u32
lba
;
44
u32
nsectors
;
46
int
dir
;
48
void
*
buf
;
49
}
hdd_ioc_devio_t
;
50
52
#define HDDIOCDEVIO _IOC(HDD_IOC_TYPE, 50)
53
55
#define HDDIOCGETSIZE _IOC(HDD_IOC_TYPE, 51)
57
#define HDDIOCSETERROR _IOC(HDD_IOC_TYPE, 52)
59
#define HDDIOCGETERROR _IOC(HDD_IOC_TYPE, 53)
60
61
/* hddfsd devctl(). */
63
#define HDDCTLGETMAXSECT _IOC(HDD_CTL_TYPE, 1)
65
#define HDDCTLGETTOTALSECT _IOC(HDD_CTL_TYPE, 2)
67
#define HDDCTLSETIDLE _IOC(HDD_CTL_TYPE, 3)
69
#define HDDCTLFLUSH _IOC(HDD_CTL_TYPE, 4)
71
#define HDDCTLSWAPTMP _IOC(HDD_CTL_TYPE, 5)
73
#define HDDCTLSHUTDOWN _IOC(HDD_CTL_TYPE, 6)
75
#define HDDCTLGETSTATUS _IOC(HDD_CTL_TYPE, 7)
77
#define HDDCTLGETFMTVER _IOC(HDD_CTL_TYPE, 8)
79
#define HDDCTLGETSMARTSTAT _IOC(HDD_CTL_TYPE, 9)
80
81
/* hddfsd extended devctl(). */
83
#define HDDCTLGETDATE _IOC(HDD_IOC_TYPE, 50)
85
#define HDDCTLINSTALLOSD _IOC(HDD_IOC_TYPE, 51)
87
#define HDDCTLGETERROR _IOC(HDD_IOC_TYPE, 52)
89
#define HDDCTLGETERRORID _IOC(HDD_IOC_TYPE, 53)
90
91
typedef
struct
92
{
93
u32 lba;
94
u32 nsectors;
95
u8 buf[];
96
}
hdd_ctl_driveio_t
;
97
99
#define HDDCTLDRIVEREAD _IOC(HDD_IOC_TYPE, 54)
101
#define HDDCTLDRIVEWRITE _IOC(HDD_IOC_TYPE, 55)
103
#define HDDCTLSCEIDENTIFY _IOC(HDD_IOC_TYPE, 56)
104
105
#endif
/* __SYS_IOCTL_H__ */
hdd_ioc_devio_t::sub
u32 sub
Definition
ioctl.h:40
hdd_ioc_devio_t::nsectors
u32 nsectors
Definition
ioctl.h:44
hdd_ioc_devio_t::dir
int dir
Definition
ioctl.h:46
hdd_ioc_devio_t::buf
void * buf
Definition
ioctl.h:48
hdd_ioc_devio_t::lba
u32 lba
Definition
ioctl.h:42
hdd_ctl_driveio_t
Definition
ioctl.h:92
hdd_ioc_devio_t
Definition
ioctl.h:38
tamtypes.h
common
include
sys
ioctl.h
Generated on Thu Nov 14 2024 05:25:24 for PS2SDK by
1.9.8