From fd74b76a78227ba1a73b11f24db0095d3f16805b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Parrino?= Date: Mon, 18 Sep 2023 18:31:15 -0300 Subject: [PATCH] Create pspiofilemgr_devctl.h --- src/user/pspiofilemgr_devctl.h | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/user/pspiofilemgr_devctl.h diff --git a/src/user/pspiofilemgr_devctl.h b/src/user/pspiofilemgr_devctl.h new file mode 100644 index 00000000..37ed32d4 --- /dev/null +++ b/src/user/pspiofilemgr_devctl.h @@ -0,0 +1,36 @@ +/* + * PSP Software Development Kit - https://github.com/pspdev + * ----------------------------------------------------------------------- + * Licensed under the BSD license, see LICENSE in PSPSDK root for details. + * + * pspiofilemgr_devctl.h - File attributes and directory entries. + * + */ + +#ifndef PSPIOFILEMGR_DEVCTL_H +#define PSPIOFILEMGR_DEVCTL_H + +#include + +/* This sceIoDevctl command gets the device capacity. */ +#define SCE_PR_GETDEV 0x02425818 + +/* This structure stores the device capacity using SCE_PR_GETDEV in sceIoDevctl */ +typedef struct SceDevInf { + /* max logical cluster x unit */ + uint32_t maxClusters; + /* number of empty clusters */ + uint32_t freeClusters; + /* cluster of empty logical block */ + uint32_t maxSectors; + /* bytes x logical sector */ + int sectorSize; + /* sector x cluster */ + int sectorCount; +} SceDevInf; + +typedef struct SceDevctlCmd { + SceDevInf *dev_inf; +} SceDevctlCmd; + +#endif /* PSPIOFILEMGR_DEVCTL_H */