From 909b42ae65cb6f3c3e81373cda32e4bdbc13ba99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Parrino?= Date: Mon, 18 Sep 2023 18:21:22 -0300 Subject: [PATCH 1/4] Update pspiofilemgr.h --- src/user/pspiofilemgr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/user/pspiofilemgr.h b/src/user/pspiofilemgr.h index 95b1a37f..6f1b7177 100644 --- a/src/user/pspiofilemgr.h +++ b/src/user/pspiofilemgr.h @@ -17,6 +17,7 @@ #include #include #include +#include /** @defgroup FileIO File IO Library * This module contains the imports for the kernel's IO routines. 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 2/4] 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 */ From b3a6694d46b0a0341b74db1a431cdb9e665c0391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Parrino?= Date: Mon, 18 Sep 2023 18:41:39 -0300 Subject: [PATCH 3/4] Update Makefile.am --- src/user/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/user/Makefile.am b/src/user/Makefile.am index 936fb146..f937dcc3 100644 --- a/src/user/Makefile.am +++ b/src/user/Makefile.am @@ -35,6 +35,7 @@ IMPOSE_OBJS = sceImpose_0000.o sceImpose_0001.o sceImpose_0002.o sceImpose_0003. libpspuserincludedir = @PSPSDK_INCLUDEDIR@ libpspuserinclude_HEADERS = \ pspiofilemgr.h \ + pspiofilemgr_devctl.h \ pspiofilemgr_dirent.h \ pspiofilemgr_fcntl.h \ pspiofilemgr_stat.h \ From 70678dd07887c3f89a4bfab1fb7bb6a85221a48d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Parrino?= Date: Tue, 19 Sep 2023 11:03:47 -0300 Subject: [PATCH 4/4] Update pspiofilemgr_devctl.h --- src/user/pspiofilemgr_devctl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/user/pspiofilemgr_devctl.h b/src/user/pspiofilemgr_devctl.h index 37ed32d4..c91e7200 100644 --- a/src/user/pspiofilemgr_devctl.h +++ b/src/user/pspiofilemgr_devctl.h @@ -24,9 +24,9 @@ typedef struct SceDevInf { /* cluster of empty logical block */ uint32_t maxSectors; /* bytes x logical sector */ - int sectorSize; + int32_t sectorSize; /* sector x cluster */ - int sectorCount; + int32_t sectorCount; } SceDevInf; typedef struct SceDevctlCmd {