sdk-world
v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Toggle main menu visibility
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
42
typedef
struct
43
{
45
char
name
[32];
47
char
filename
[40];
49
u32
size
;
51
int
formatted
;
53
u32
freeSpace
;
55
int
fileSystemGroup
;
56
}
t_hddFilesystem
;
57
58
typedef
struct
59
{
61
u32
hddSize
;
63
u32
hddFree
;
65
u32
hddMaxPartitionSize
;
66
}
t_hddInfo
;
67
68
#ifdef __cplusplus
69
extern
"C"
{
70
#endif
71
72
extern
int
hddCheckPresent();
73
extern
int
hddCheckFormatted();
74
extern
int
hddFormat();
75
extern
int
hddGetFilesystemList(
t_hddFilesystem
hddFs[],
int
maxEntries);
76
extern
void
hddGetInfo(
t_hddInfo
*info);
77
extern
int
hddMakeFilesystem(
int
fsSizeMB,
char
*name,
int
type);
78
extern
int
hddRemoveFilesystem(
t_hddFilesystem
*fs);
79
extern
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__ */
t_hddFilesystem
Definition
libhdd.h:43
t_hddFilesystem::size
u32 size
Definition
libhdd.h:49
t_hddFilesystem::filename
char filename[40]
Definition
libhdd.h:47
t_hddFilesystem::freeSpace
u32 freeSpace
Definition
libhdd.h:53
t_hddFilesystem::name
char name[32]
Definition
libhdd.h:45
t_hddFilesystem::formatted
int formatted
Definition
libhdd.h:51
t_hddFilesystem::fileSystemGroup
int fileSystemGroup
Definition
libhdd.h:55
t_hddInfo
Definition
libhdd.h:59
t_hddInfo::hddFree
u32 hddFree
Definition
libhdd.h:63
t_hddInfo::hddSize
u32 hddSize
Definition
libhdd.h:61
t_hddInfo::hddMaxPartitionSize
u32 hddMaxPartitionSize
Definition
libhdd.h:65
hdd
include
libhdd.h
Generated by
1.18.0