ps2sdk  1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
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 #ifndef __LIBHDD_H__
17 #define __LIBHDD_H__
18 
19 #include <tamtypes.h>
20 #include <hdd-ioctl.h>
21 #include <libpwroff.h>
22 
23 #define PFS_MT_ROBUST 0x02
24 
25 #define FS_COMMON_PREFIX '+'
26 
27 #define FS_GROUP_SYSTEM 0x00
28 #define FS_GROUP_COMMON 0x01
29 #define FS_GROUP_APPLICATION 0x02
30 
31 #define FS_TYPE_EXT2 0x0083
32 #define FS_TYPE_EXT2_SWAP 0x0082
33 #define FS_TYPE_PFS 0x0100
34 #define FS_TYPE_EMPTY 0x0000
35 
36 #define ATTR_MAIN_PARTITION 0x0000
37 #define ATTR_SUB_PARTITION 0x0001
38 
39 typedef struct {
41  char name[32];
43  char filename[40];
47  int formatted;
53 
54 typedef struct {
61 } t_hddInfo;
62 
63 #ifdef __cplusplus
64 extern "C" {
65 #endif
66 
67 int hddCheckPresent();
68 int hddCheckFormatted();
69 int hddFormat();
70 int hddGetFilesystemList(t_hddFilesystem hddFs[], int maxEntries);
72 int hddMakeFilesystem(int fsSizeMB, char *name, int type);
74 int hddExpandFilesystem(t_hddFilesystem *fs, int extraMB);
75 
76 #ifdef __cplusplus
77 }
78 #endif
79 
80 // These hdd* functions are deprecated
81 // Use the poweroff* version instead
82 
83 #define hddPreparePoweroff poweroffInit
84 #define hddSetUserPoweroffCallback poweroffSetCallback
85 #define hddPowerOff poweroffShutdown
86 
87 #endif /* __LIBHDD_H__ */
jpgData * info
Definition: camera-test.c:14
int hddExpandFilesystem(t_hddFilesystem *fs, int extraMB)
Definition: libhdd.c:473
int hddRemoveFilesystem(t_hddFilesystem *fs)
Definition: libhdd.c:459
int hddFormat()
Definition: libhdd.c:105
int hddGetFilesystemList(t_hddFilesystem hddFs[], int maxEntries)
Definition: libhdd.c:135
int hddMakeFilesystem(int fsSizeMB, char *name, int type)
Definition: libhdd.c:295
int hddCheckPresent()
Definition: libhdd.c:75
void hddGetInfo(t_hddInfo *info)
Definition: libhdd.c:253
int hddCheckFormatted()
Definition: libhdd.c:90
u32 freeSpace
Definition: libhdd.h:49
int formatted
Definition: libhdd.h:47
int fileSystemGroup
Definition: libhdd.h:51
u32 hddFree
Definition: libhdd.h:58
u32 hddSize
Definition: libhdd.h:56
u32 hddMaxPartitionSize
Definition: libhdd.h:60
unsigned int u32
Definition: tamtypes.h:30