PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
ioctl.h File Reference
#include <tamtypes.h>
+ Include dependency graph for ioctl.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  hdd_ioc_devio_t
 
struct  hdd_ctl_driveio_t
 

Macros

#define _IOC(type, nr)   (((type) << 8) | (nr))
 
#define HDD_IOC_TYPE   'H'
 
#define HDD_CTL_TYPE   'h'
 
#define HDDIOCADDSUB   _IOC(HDD_IOC_TYPE, 1)
 
#define HDDIOCDELSUB   _IOC(HDD_IOC_TYPE, 2)
 
#define HDDIOCGETSUBS   _IOC(HDD_IOC_TYPE, 3)
 
#define HDDIOCFLUSH   _IOC(HDD_IOC_TYPE, 4)
 
#define HDDIOCDEVIO   _IOC(HDD_IOC_TYPE, 50)
 
#define HDDIOCGETSIZE   _IOC(HDD_IOC_TYPE, 51)
 
#define HDDIOCSETERROR   _IOC(HDD_IOC_TYPE, 52)
 
#define HDDIOCGETERROR   _IOC(HDD_IOC_TYPE, 53)
 
#define HDDCTLGETMAXSECT   _IOC(HDD_CTL_TYPE, 1)
 
#define HDDCTLGETTOTALSECT   _IOC(HDD_CTL_TYPE, 2)
 
#define HDDCTLSETIDLE   _IOC(HDD_CTL_TYPE, 3)
 
#define HDDCTLFLUSH   _IOC(HDD_CTL_TYPE, 4)
 
#define HDDCTLSWAPTMP   _IOC(HDD_CTL_TYPE, 5)
 
#define HDDCTLSHUTDOWN   _IOC(HDD_CTL_TYPE, 6)
 
#define HDDCTLGETSTATUS   _IOC(HDD_CTL_TYPE, 7)
 
#define HDDCTLGETFMTVER   _IOC(HDD_CTL_TYPE, 8)
 
#define HDDCTLGETSMARTSTAT   _IOC(HDD_CTL_TYPE, 9)
 
#define HDDCTLGETDATE   _IOC(HDD_IOC_TYPE, 50)
 
#define HDDCTLINSTALLOSD   _IOC(HDD_IOC_TYPE, 51)
 
#define HDDCTLGETERROR   _IOC(HDD_IOC_TYPE, 52)
 
#define HDDCTLGETERRORID   _IOC(HDD_IOC_TYPE, 53)
 
#define HDDCTLDRIVEREAD   _IOC(HDD_IOC_TYPE, 54)
 
#define HDDCTLDRIVEWRITE   _IOC(HDD_IOC_TYPE, 55)
 
#define HDDCTLSCEIDENTIFY   _IOC(HDD_IOC_TYPE, 56)
 

Detailed Description

ioctl(), ioctl2(), and devctl() definitions.

Definition in file ioctl.h.


Data Structure Documentation

◆ hdd_ioc_devio_t

struct hdd_ioc_devio_t

Definition at line 37 of file ioctl.h.

Data Fields
u32 sub

Main or subpartition index.

u32 lba

Start LBA.

u32 nsectors

Number of sectors.

int dir

Transfer direction, same as sceAtaDmaTransfer().

void * buf

Data buffer.

◆ hdd_ctl_driveio_t

struct hdd_ctl_driveio_t

Definition at line 91 of file ioctl.h.

Data Fields
u32 lba
u32 nsectors
u8 buf[]

Macro Definition Documentation

◆ _IOC

#define _IOC (   type,
  nr 
)    (((type) << 8) | (nr))

Definition at line 21 of file ioctl.h.

◆ HDD_IOC_TYPE

#define HDD_IOC_TYPE   'H'

Definition at line 23 of file ioctl.h.

◆ HDD_CTL_TYPE

#define HDD_CTL_TYPE   'h'

Definition at line 24 of file ioctl.h.

◆ HDDIOCADDSUB

#define HDDIOCADDSUB   _IOC(HDD_IOC_TYPE, 1)

Add a subpartition.

Definition at line 28 of file ioctl.h.

◆ HDDIOCDELSUB

#define HDDIOCDELSUB   _IOC(HDD_IOC_TYPE, 2)

Delete a subpartition.

Definition at line 30 of file ioctl.h.

◆ HDDIOCGETSUBS

#define HDDIOCGETSUBS   _IOC(HDD_IOC_TYPE, 3)

Get the number of subpartitions.

Definition at line 32 of file ioctl.h.

◆ HDDIOCFLUSH

#define HDDIOCFLUSH   _IOC(HDD_IOC_TYPE, 4)

Flush the HDD's cache.

Definition at line 35 of file ioctl.h.

◆ HDDIOCDEVIO

#define HDDIOCDEVIO   _IOC(HDD_IOC_TYPE, 50)

Write to partition data area.

Definition at line 52 of file ioctl.h.

◆ HDDIOCGETSIZE

#define HDDIOCGETSIZE   _IOC(HDD_IOC_TYPE, 51)

Size of main or subpartition.

Definition at line 55 of file ioctl.h.

◆ HDDIOCSETERROR

#define HDDIOCSETERROR   _IOC(HDD_IOC_TYPE, 52)

Set the last drive error.

Definition at line 57 of file ioctl.h.

◆ HDDIOCGETERROR

#define HDDIOCGETERROR   _IOC(HDD_IOC_TYPE, 53)

Get the last drive error.

Definition at line 59 of file ioctl.h.

◆ HDDCTLGETMAXSECT

#define HDDCTLGETMAXSECT   _IOC(HDD_CTL_TYPE, 1)

Get max. partition sectors.

Definition at line 63 of file ioctl.h.

◆ HDDCTLGETTOTALSECT

#define HDDCTLGETTOTALSECT   _IOC(HDD_CTL_TYPE, 2)

Get total number of sectors.

Definition at line 65 of file ioctl.h.

◆ HDDCTLSETIDLE

#define HDDCTLSETIDLE   _IOC(HDD_CTL_TYPE, 3)

Set the drive's idle timeout.

Definition at line 67 of file ioctl.h.

◆ HDDCTLFLUSH

#define HDDCTLFLUSH   _IOC(HDD_CTL_TYPE, 4)

Flush the HDD's cache.

Definition at line 69 of file ioctl.h.

◆ HDDCTLSWAPTMP

#define HDDCTLSWAPTMP   _IOC(HDD_CTL_TYPE, 5)

Swap this partition for _)tmp.

Definition at line 71 of file ioctl.h.

◆ HDDCTLSHUTDOWN

#define HDDCTLSHUTDOWN   _IOC(HDD_CTL_TYPE, 6)

Shutdown the drive.

Definition at line 73 of file ioctl.h.

◆ HDDCTLGETSTATUS

#define HDDCTLGETSTATUS   _IOC(HDD_CTL_TYPE, 7)

Get status of drive.

Definition at line 75 of file ioctl.h.

◆ HDDCTLGETFMTVER

#define HDDCTLGETFMTVER   _IOC(HDD_CTL_TYPE, 8)

Get version of APA format.

Definition at line 77 of file ioctl.h.

◆ HDDCTLGETSMARTSTAT

#define HDDCTLGETSMARTSTAT   _IOC(HDD_CTL_TYPE, 9)

Get SMART status for this drive.

Definition at line 79 of file ioctl.h.

◆ HDDCTLGETDATE

#define HDDCTLGETDATE   _IOC(HDD_IOC_TYPE, 50)

Get the current date.

Definition at line 83 of file ioctl.h.

◆ HDDCTLINSTALLOSD

#define HDDCTLINSTALLOSD   _IOC(HDD_IOC_TYPE, 51)

Not supported by hddfsd.irx!

Definition at line 85 of file ioctl.h.

◆ HDDCTLGETERROR

#define HDDCTLGETERROR   _IOC(HDD_IOC_TYPE, 52)

Get the last drive error.

Definition at line 87 of file ioctl.h.

◆ HDDCTLGETERRORID

#define HDDCTLGETERRORID   _IOC(HDD_IOC_TYPE, 53)

Get the id of the error partition.

Definition at line 89 of file ioctl.h.

◆ HDDCTLDRIVEREAD

#define HDDCTLDRIVEREAD   _IOC(HDD_IOC_TYPE, 54)

ATA device read.

Definition at line 99 of file ioctl.h.

◆ HDDCTLDRIVEWRITE

#define HDDCTLDRIVEWRITE   _IOC(HDD_IOC_TYPE, 55)

ATA device write.

Definition at line 101 of file ioctl.h.

◆ HDDCTLSCEIDENTIFY

#define HDDCTLSCEIDENTIFY   _IOC(HDD_IOC_TYPE, 56)

Not supported by hddfsd.irx!

Definition at line 103 of file ioctl.h.