diff --git a/rpcs3/Emu/Cell/lv2/sys_fs.cpp b/rpcs3/Emu/Cell/lv2/sys_fs.cpp index 557dcb0faa..2496d452b7 100644 --- a/rpcs3/Emu/Cell/lv2/sys_fs.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_fs.cpp @@ -302,34 +302,6 @@ std::string lv2_fs_object::device_name_to_path(std::string_view device_name) return {}; } -u64 lv2_fs_object::get_mount_count() -{ - u64 count = 0; - - for (auto mp = &g_mp_sys_dev_root; mp; mp = mp->next) - { - if (mp == &g_mp_sys_dev_usb) - { - for (int i = 0; i < 8; i++) - { - if (!vfs::get(fmt::format("%s%03d", mp->root, i)).empty()) - { - count++; - } - } - } - else - { - if (!vfs::get(mp->root).empty()) - { - count++; - } - } - } - - return count; -} - bool lv2_fs_object::vfs_unmount(std::string_view vpath, bool no_error) { const std::string local_path = vfs::get(vpath); @@ -3072,7 +3044,30 @@ error_code sys_fs_get_mount_info_size(ppu_thread&, vm::ptr len) return CELL_EFAULT; } - *len = lv2_fs_object::get_mount_count(); + u64 count = 0; + + for (auto mp = &g_mp_sys_dev_root; mp; mp = mp->next) + { + if (mp == &g_mp_sys_dev_usb) + { + for (int i = 0; i < 8; i++) + { + if (!vfs::get(fmt::format("%s%03d", mp->root, i)).empty()) + { + count++; + } + } + } + else + { + if (!vfs::get(mp->root).empty()) + { + count++; + } + } + } + + *len = count; return CELL_OK; } diff --git a/rpcs3/Emu/Cell/lv2/sys_fs.h b/rpcs3/Emu/Cell/lv2/sys_fs.h index b148ab5669..f1af975b3d 100644 --- a/rpcs3/Emu/Cell/lv2/sys_fs.h +++ b/rpcs3/Emu/Cell/lv2/sys_fs.h @@ -192,7 +192,6 @@ public: static std::string_view get_device_path(std::string_view filename); static lv2_fs_mount_point* get_mp(std::string_view filename, std::string* vfs_path = nullptr); static std::string device_name_to_path(std::string_view device_name); - static u64 get_mount_count(); static bool vfs_unmount(std::string_view vpath, bool no_error = false); static std::array get_name(std::string_view filename)