ps2sdk
1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
|
Go to the source code of this file.
Data Structures | |
struct | t_hddFilesystem |
struct | t_hddInfo |
Macros | |
#define | PFS_MT_ROBUST 0x02 |
#define | FS_COMMON_PREFIX '+' |
#define | FS_GROUP_SYSTEM 0x00 |
#define | FS_GROUP_COMMON 0x01 |
#define | FS_GROUP_APPLICATION 0x02 |
#define | FS_TYPE_EXT2 0x0083 |
#define | FS_TYPE_EXT2_SWAP 0x0082 |
#define | FS_TYPE_PFS 0x0100 |
#define | FS_TYPE_EMPTY 0x0000 |
#define | ATTR_MAIN_PARTITION 0x0000 |
#define | ATTR_SUB_PARTITION 0x0001 |
#define | hddPreparePoweroff poweroffInit |
#define | hddSetUserPoweroffCallback poweroffSetCallback |
#define | hddPowerOff poweroffShutdown |
Functions | |
int | hddCheckPresent () |
int | hddCheckFormatted () |
int | hddFormat () |
int | hddGetFilesystemList (t_hddFilesystem hddFs[], int maxEntries) |
void | hddGetInfo (t_hddInfo *info) |
int | hddMakeFilesystem (int fsSizeMB, char *name, int type) |
int | hddRemoveFilesystem (t_hddFilesystem *fs) |
int | hddExpandFilesystem (t_hddFilesystem *fs, int extraMB) |
HDD library functions
Definition in file libhdd.h.
#define hddPowerOff poweroffShutdown |
#define hddPreparePoweroff poweroffInit |
#define hddSetUserPoweroffCallback poweroffSetCallback |
int hddCheckFormatted | ( | ) |
Definition at line 90 of file libhdd.c.
References fileXioDevctl(), hddStatusCurrent, hddUpdateInfo(), HDIOC_STATUS, and NULL.
int hddCheckPresent | ( | ) |
Definition at line 75 of file libhdd.c.
References fileXioDevctl(), hddStatusCurrent, hddUpdateInfo(), HDIOC_STATUS, and NULL.
int hddExpandFilesystem | ( | t_hddFilesystem * | fs, |
int | extraMB | ||
) |
Definition at line 473 of file libhdd.c.
References EFBIG, EINVAL, ENOSPC, t_hddFilesystem::filename, fileXioClose(), fileXioIoctl2(), fileXioOpen(), FIO_O_RDWR, hddMaxPartitionSize, hddStatusCurrent, hddUpdateInfo(), HIOCADDSUB, NULL, sizesMB, and sizesString.
int hddFormat | ( | ) |
Definition at line 105 of file libhdd.c.
References fileXioFormat(), hddStatusCurrent, hddUpdateInfo(), NULL, and pfsFormatArg.
int hddGetFilesystemList | ( | t_hddFilesystem | hddFs[], |
int | maxEntries | ||
) |
Definition at line 135 of file libhdd.c.
References iox_stat_t::attr, ATTR_SUB_PARTITION, t_hddFilesystem::fileSystemGroup, fileXioClose(), fileXioDclose(), fileXioDevctl(), fileXioDopen(), fileXioDread(), fileXioIoctl2(), fileXioMount(), fileXioOpen(), fileXioUmount(), FIO_MT_RDONLY, FIO_O_RDONLY, t_hddFilesystem::formatted, t_hddFilesystem::freeSpace, FS_COMMON_PREFIX, FS_GROUP_APPLICATION, FS_GROUP_COMMON, FS_GROUP_SYSTEM, FS_TYPE_EMPTY, FS_TYPE_PFS, hddStatusCurrent, hddUpdateInfo(), HIOCGETSIZE, iox_stat_t::mode, iox_dirent_t::name, NULL, PDIOC_ZONEFREE, PDIOC_ZONESZ, iox_stat_t::private_0, t_hddFilesystem::size, and iox_dirent_t::stat.
void hddGetInfo | ( | t_hddInfo * | info | ) |
Definition at line 253 of file libhdd.c.
References hddFree, hddMaxPartitionSize, hddSize, hddUpdateInfo(), and info.
int hddMakeFilesystem | ( | int | fsSizeMB, |
char * | name, | ||
int | type | ||
) |
Definition at line 295 of file libhdd.c.
References EACCES, EFBIG, EINVAL, ENOSPC, fileXioClose(), fileXioFormat(), fileXioIoctl2(), fileXioOpen(), FIO_O_CREAT, FIO_O_RDONLY, FIO_O_RDWR, FS_GROUP_COMMON, FS_GROUP_SYSTEM, hddMaxPartitionSize, hddStatusCurrent, hddUpdateInfo(), HIOCADDSUB, NULL, pfsFormatArg, sizesMB, and sizesString.
int hddRemoveFilesystem | ( | t_hddFilesystem * | fs | ) |
Definition at line 459 of file libhdd.c.
References t_hddFilesystem::filename, fileXioRemove(), hddStatusCurrent, and hddUpdateInfo().