diff options
author | Reiko Asakura | 2020-07-23 15:34:54 -0400 |
---|---|---|
committer | Reiko Asakura | 2020-07-23 15:34:54 -0400 |
commit | 9f45649bc1bd6cbdbe8b2c4233726dae47dae480 (patch) | |
tree | c8ac12d9c60c2fe61573ac44bb9364379c8e2c66 /include | |
parent | Refactor kernel IO functions (diff) | |
download | vds-libraries-9f45649bc1bd6cbdbe8b2c4233726dae47dae480.tar.gz |
Add {,k}sceIo{Io,Dev}ctlAsync prototypes
Diffstat (limited to 'include')
-rw-r--r-- | include/kernel/io/devctl.h | 18 | ||||
-rw-r--r-- | include/kernel/kernel/iofilemgr.h | 40 | ||||
-rw-r--r-- | include/user/compat.h | 2 | ||||
-rw-r--r-- | include/user/io/devctl.h | 31 | ||||
-rw-r--r-- | include/user/kernel/iofilemgr.h | 38 |
5 files changed, 83 insertions, 46 deletions
diff --git a/include/kernel/io/devctl.h b/include/kernel/io/devctl.h index 1f3305a..024a60a 100644 --- a/include/kernel/io/devctl.h +++ b/include/kernel/io/devctl.h @@ -1,22 +1,8 @@ #ifndef _PSP2_IO_DEVCTL_H_ #define _PSP2_IO_DEVCTL_H_ -#include <psp2kern/kernel/iofilemgr.h> - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct SceIoDevInfo { - SceOff max_size; - SceOff free_size; - SceSize cluster_size; - void *unk; -} SceIoDevInfo; +#pragma GCC warning "psp2kern/io/devctl.h is deprecated. Please include psp2kern/kernel/iofilemgr.h." -#ifdef __cplusplus -} -#endif +#include <psp2kern/kernel/iofilemgr.h> #endif /* _PSP2_IO_DEVCTL_H_ */ - diff --git a/include/kernel/kernel/iofilemgr.h b/include/kernel/kernel/iofilemgr.h index 207b0c2..bb3dbac 100644 --- a/include/kernel/kernel/iofilemgr.h +++ b/include/kernel/kernel/iofilemgr.h @@ -60,6 +60,16 @@ extern "C" { #define SCE_IO_MAX_PATH_LENGTH (200) /* maximum path length */ /** + * May be used with sceIoDevctl() + */ +typedef struct SceIoDevInfo { + SceOff max_size; + SceOff free_size; + SceSize cluster_size; + void *unk; +} SceIoDevInfo; + +/** * Remove directory entry * * @param filename - Path to the file to remove @@ -253,6 +263,36 @@ SceSSize sceIoPwrite(SceUID fd, const void *buf, SceSize nbyte, SceOff offset); */ int sceIoSyncByFd(SceUID fd, int flag); +/*--------------------Async IO--------------------*/ + +/** + * This function is unimplemented. + * + * @return SCE_KERNEL_ERROR_UNSUP (0x80020004) + */ +int sceIoIoctlAsync( + SceUID fd, + int cmd, + const void *argp, + SceSize arglen, + void *bufp, + SceSize buflen, + SceIoAsyncParam* asyncParam); + +/** + * This function is unimplemented. + * + * @return SCE_KERNEL_ERROR_UNSUP (0x80020004) + */ +int sceIoDevctlAsync( + const char *devname, + int cmd, + const void *arg, + SceSize arglen, + void *bufp, + SceSize buflen, + SceIoAsyncParam* asyncParam); + /*--------------------Device mount functions--------------------*/ /** diff --git a/include/user/compat.h b/include/user/compat.h index 9a4786e..9868df9 100644 --- a/include/user/compat.h +++ b/include/user/compat.h @@ -1,7 +1,7 @@ #ifndef _PSP2_COMPAT_H_ #define _PSP2_COMPAT_H_ -#include <psp2/io/devctl.h> +#include <psp2/kernel/iofilemgr.h> #include <psp2/rtc.h> #include <psp2/types.h> #include <stdint.h> diff --git a/include/user/io/devctl.h b/include/user/io/devctl.h index 2b9c96a..47f6ac8 100644 --- a/include/user/io/devctl.h +++ b/include/user/io/devctl.h @@ -1,35 +1,8 @@ #ifndef _PSP2_IO_DEVCTL_H_ #define _PSP2_IO_DEVCTL_H_ -#include <psp2/kernel/iofilemgr.h> - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct SceIoDevInfo { - SceOff max_size; - SceOff free_size; - SceSize cluster_size; - void *unk; -} SceIoDevInfo; +#pragma GCC warning "psp2/io/devctl.h is deprecated. Please include psp2/kernel/iofilemgr.h." -/** - * Perform an ioctl on a device. (asynchronous) - * - * @param fd - Opened file descriptor to ioctl to - * @param cmd - The command to send to the device - * @param indata - A data block to send to the device, if NULL sends no data - * @param inlen - Length of indata, if 0 sends no data - * @param outdata - A data block to receive the result of a command, if NULL receives no data - * @param outlen - Length of outdata, if 0 receives no data - * @return 0 on success, < 0 on error - */ -int sceIoIoctlAsync(SceUID fd, unsigned int cmd, void *indata, int inlen, void *outdata, int outlen); - -#ifdef __cplusplus -} -#endif +#include <psp2/kernel/iofilemgr.h> #endif /* _PSP2_IO_DEVCTL_H_ */ - diff --git a/include/user/kernel/iofilemgr.h b/include/user/kernel/iofilemgr.h index 87ad029..240705b 100644 --- a/include/user/kernel/iofilemgr.h +++ b/include/user/kernel/iofilemgr.h @@ -61,6 +61,16 @@ extern "C" { #define SCE_IO_MAX_PATH_LENGTH (200) /* maximum path length */ /** + * May be used with sceIoDevctl() + */ +typedef struct SceIoDevInfo { + SceOff max_size; + SceOff free_size; + SceSize cluster_size; + void *unk; +} SceIoDevInfo; + +/** * Remove directory entry * * @param filename - Path to the file to remove @@ -418,6 +428,34 @@ SceUID sceIoSyncByFdAsync(SceUID fd, int flag, SceIoAsyncParam* asyncParam); */ SceUID sceIoSyncAsync(const char* device, int flag, SceIoAsyncParam* asyncParam); +/** + * This function is unimplemented. + * + * @return SCE_KERNEL_ERROR_UNSUP (0x80020004) + */ +int sceIoIoctlAsync( + SceUID fd, + int cmd, + const void *argp, + SceSize arglen, + void *bufp, + SceSize buflen, + SceIoAsyncParam* asyncParam); + +/** + * This function is unimplemented. + * + * @return SCE_KERNEL_ERROR_UNSUP (0x80020004) + */ +int sceIoDevctlAsync( + const char *devname, + int cmd, + const void *arg, + SceSize arglen, + void *bufp, + SceSize buflen, + SceIoAsyncParam* asyncParam); + /*--------------------IO Priority--------------------*/ /*Valid priority values range: 1 (highest) - 15 (lowest). Default priority value is 14*/ |