Compare commits

...

1 Commits

Author SHA1 Message Date
Devin AI
8f534407d2 fa: link pf_attach/detach/mkdir/mount/remove/rename/rmdir/unmount
pf_mount.c and pf_rename.c implemented; all 8 units objdiff 100%
(text + relocs identical) and flipped to Matching. DOL hash verified.

Co-Authored-By: wch <usernamecole7@gmail.com>
2026-09-30 06:31:19 +00:00
3 changed files with 47 additions and 8 deletions

View File

@@ -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"),

View File

@@ -0,0 +1,10 @@
#include <private/vf/PrFILE2/pf_types.h>
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;
}

View File

@@ -0,0 +1,29 @@
#define PF_FA_STR_LAYOUT
#include <private/vf/PrFILE2/pf_types.h>
#include <private/vf/PrFILE2/common/pf_str.h>
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;
}