diff --git a/configure.py b/configure.py index f120143e..91f3271d 100644 --- a/configure.py +++ b/configure.py @@ -1708,7 +1708,7 @@ config.libs = [ Object(NonMatching, "fa/pf_volume_apiadd.c"), Object(NonMatching, "fa/pf_cp932.c"), Object(Matching, "fa/pf_api_util.c"), - Object(NonMatching, "fa/pf_attach.c"), + Object(Matching, "fa/pf_attach.c"), Object(NonMatching, "fa/pf_buffering.c"), Object(NonMatching, "fa/pf_cdelete.c"), Object(NonMatching, "fa/pf_chdir.c"), @@ -1721,7 +1721,7 @@ config.libs = [ Object(NonMatching, "fa/pf_createdir.c"), Object(NonMatching, "fa/pf_cut.c"), Object(NonMatching, "fa/pf_derrnum.c"), - Object(NonMatching, "fa/pf_detach.c"), + Object(Matching, "fa/pf_detach.c"), Object(NonMatching, "fa/pf_divide.c"), Object(Matching, "fa/pf_errnum.c"), Object(NonMatching, "fa/pf_fadjust.c"), @@ -1750,16 +1750,16 @@ config.libs = [ Object(NonMatching, "fa/pf_init_prfile2.c"), Object(NonMatching, "fa/pf_insert.c"), Object(NonMatching, "fa/pf_iswriteprotected.c"), - Object(NonMatching, "fa/pf_mkdir.c"), - Object(NonMatching, "fa/pf_mount.c"), + Object(Matching, "fa/pf_mkdir.c"), + Object(Matching, "fa/pf_mount.c"), Object(NonMatching, "fa/pf_move.c"), Object(NonMatching, "fa/pf_opendir.c"), Object(NonMatching, "fa/pf_readdir.c"), Object(NonMatching, "fa/pf_regctx.c"), - Object(NonMatching, "fa/pf_remove.c"), - Object(NonMatching, "fa/pf_rename.c"), + Object(Matching, "fa/pf_remove.c"), + Object(Matching, "fa/pf_rename.c"), Object(NonMatching, "fa/pf_rewinddir.c"), - Object(NonMatching, "fa/pf_rmdir.c"), + Object(Matching, "fa/pf_rmdir.c"), Object(NonMatching, "fa/pf_rmvvol.c"), Object(NonMatching, "fa/pf_seekdir.c"), Object(NonMatching, "fa/pf_setclstlink.c"), @@ -1771,7 +1771,7 @@ config.libs = [ Object(NonMatching, "fa/pf_setvolcfg.c"), Object(NonMatching, "fa/pf_sync.c"), Object(NonMatching, "fa/pf_telldir.c"), - Object(NonMatching, "fa/pf_unmount.c"), + Object(Matching, "fa/pf_unmount.c"), Object(NonMatching, "fa/pf_unregctx.c"), Object(NonMatching, "fa/pf_xdivide.c"), Object(Matching, "fa/pf_w_api_util.c"), diff --git a/libs/RVL_SDK/src/fa/pf_mount.c b/libs/RVL_SDK/src/fa/pf_mount.c new file mode 100644 index 00000000..88469ada --- /dev/null +++ b/libs/RVL_SDK/src/fa/pf_mount.c @@ -0,0 +1,10 @@ +#include + +extern pf_s32 PFVOL_mount(pf_s8 drv_char); +extern pf_s32 PFAPI_convertReturnValue(pf_s32 err); + +pf_int32 pf2_mount(pf_ch8 drive) { + pf_s32 err = PFVOL_mount(drive); + err = PFAPI_convertReturnValue(err); + return err; +} diff --git a/libs/RVL_SDK/src/fa/pf_rename.c b/libs/RVL_SDK/src/fa/pf_rename.c new file mode 100644 index 00000000..9c1f0c05 --- /dev/null +++ b/libs/RVL_SDK/src/fa/pf_rename.c @@ -0,0 +1,29 @@ +#define PF_FA_STR_LAYOUT +#include +#include + +typedef struct PFAPI_GLOBAL_STATE { + pf_u8 volume_state[0x40]; + pf_s32 last_error; +} PFAPI_GLOBAL_STATE; +extern PFAPI_GLOBAL_STATE pf_vol_set; + +extern pf_s32 PFSTR_InitStr(PF_STR* p_str, const pf_s8* s, pf_u32 code_mode); +extern pf_s32 PFDIR_rename(PF_STR* old_path, PF_STR* new_path); +extern pf_s32 PFAPI_convertReturnValue(pf_s32 err); + +pf_int32 pf2_rename(const pf_ch8* oldPath, const pf_ch8* newPath) { + pf_s32 err; + PF_STR old_str; + PF_STR new_str; + + err = PFSTR_InitStr(&old_str, (pf_s8*)oldPath, 1U); + err |= PFSTR_InitStr(&new_str, (pf_s8*)newPath, 1U); + if (err == 0) { + err = PFDIR_rename(&old_str, &new_str); + } else { + pf_vol_set.last_error = err; + } + err = PFAPI_convertReturnValue(err); + return err; +}