sdk-world v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Loading...
Searching...
No Matches
libhdd.h
Go to the documentation of this file.
1/*
2# _____ ___ ____ ___ ____
3# ____| | ____| | | |____|
4# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5#-----------------------------------------------------------------------
6# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7# Licenced under Academic Free License version 2.0
8# Review ps2sdk README & LICENSE files for further details.
9*/
10
16
17#ifndef __LIBHDD_H__
18#define __LIBHDD_H__
19
20#include <tamtypes.h>
21#include <hdd-ioctl.h>
22#include <libpwroff.h>
23
24#define PFS_MT_ROBUST 0x02
25
26#define FS_COMMON_PREFIX '+'
27
28#define FS_GROUP_SYSTEM 0x00
29#define FS_GROUP_COMMON 0x01
30#define FS_GROUP_APPLICATION 0x02
31
32#define FS_TYPE_EXT2_SWAP 0x0082
33#define FS_TYPE_EXT2 0x0083
34#define FS_TYPE_REISER 0x0088
35#define FS_TYPE_PFS 0x0100
36#define FS_TYPE_CFS 0x0101
37#define FS_TYPE_EMPTY 0x0000
38
39#define ATTR_MAIN_PARTITION 0x0000
40#define ATTR_SUB_PARTITION 0x0001
41
42typedef struct
43{
45 char name[32];
47 char filename[40];
49 u32 size;
57
58typedef struct
59{
66} t_hddInfo;
67
68#ifdef __cplusplus
69extern "C" {
70#endif
71
72extern int hddCheckPresent();
73extern int hddCheckFormatted();
74extern int hddFormat();
75extern int hddGetFilesystemList(t_hddFilesystem hddFs[], int maxEntries);
76extern void hddGetInfo(t_hddInfo *info);
77extern int hddMakeFilesystem(int fsSizeMB, char *name, int type);
78extern int hddRemoveFilesystem(t_hddFilesystem *fs);
79extern int hddExpandFilesystem(t_hddFilesystem *fs, int extraMB);
80
81#ifdef __cplusplus
82}
83#endif
84
85// These hdd* functions are deprecated
86// Use the poweroff* version instead
87
88#define hddPreparePoweroff poweroffInit
89#define hddSetUserPoweroffCallback poweroffSetCallback
90#define hddPowerOff poweroffShutdown
91
92#endif /* __LIBHDD_H__ */
char filename[40]
Definition libhdd.h:47
char name[32]
Definition libhdd.h:45
int fileSystemGroup
Definition libhdd.h:55
u32 hddFree
Definition libhdd.h:63
u32 hddSize
Definition libhdd.h:61
u32 hddMaxPartitionSize
Definition libhdd.h:65