PS2SDK
PS2 Homebrew Libraries
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#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_SWAP 0x0082
32#define FS_TYPE_EXT2 0x0083
33#define FS_TYPE_REISER 0x0088
34#define FS_TYPE_PFS 0x0100
35#define FS_TYPE_CFS 0x0101
36#define FS_TYPE_EMPTY 0x0000
37
38#define ATTR_MAIN_PARTITION 0x0000
39#define ATTR_SUB_PARTITION 0x0001
40
41typedef struct
42{
44 char name[32];
46 char filename[40];
48 u32 size;
56
57typedef struct
58{
65} t_hddInfo;
66
67#ifdef __cplusplus
68extern "C" {
69#endif
70
71extern int hddCheckPresent();
72extern int hddCheckFormatted();
73extern int hddFormat();
74extern int hddGetFilesystemList(t_hddFilesystem hddFs[], int maxEntries);
75extern void hddGetInfo(t_hddInfo *info);
76extern int hddMakeFilesystem(int fsSizeMB, char *name, int type);
77extern int hddRemoveFilesystem(t_hddFilesystem *fs);
78extern int hddExpandFilesystem(t_hddFilesystem *fs, int extraMB);
79
80#ifdef __cplusplus
81}
82#endif
83
84// These hdd* functions are deprecated
85// Use the poweroff* version instead
86
87#define hddPreparePoweroff poweroffInit
88#define hddSetUserPoweroffCallback poweroffSetCallback
89#define hddPowerOff poweroffShutdown
90
91#endif /* __LIBHDD_H__ */
u32 hddFree
Definition libhdd.h:62
u32 hddSize
Definition libhdd.h:60
int fileSystemGroup
Definition libhdd.h:54
u32 hddMaxPartitionSize
Definition libhdd.h:64
Power-off library.