Improve sceIoGetDevType() return values.

At least for block/file devices.  Can't find a way to get an alias.
This commit is contained in:
Unknown W. Brackets
2013-12-26 22:07:41 -08:00
parent 23971e9900
commit 0bf1ef5773
10 changed files with 66 additions and 16 deletions

View File

@@ -493,6 +493,11 @@ int DirectoryFileSystem::Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u3
return SCE_KERNEL_ERROR_ERRNO_FUNCTION_NOT_SUPPORTED;
}
int DirectoryFileSystem::DevType(u32 handle) {
EntryMap::iterator iter = entries.find(handle);
return PSP_DEV_TYPE_FILE;
}
size_t DirectoryFileSystem::ReadFile(u32 handle, u8 *pointer, s64 size) {
EntryMap::iterator iter = entries.find(handle);
if (iter != entries.end())
@@ -775,6 +780,11 @@ int VFSFileSystem::Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outd
return SCE_KERNEL_ERROR_ERRNO_FUNCTION_NOT_SUPPORTED;
}
int VFSFileSystem::DevType(u32 handle) {
EntryMap::iterator iter = entries.find(handle);
return PSP_DEV_TYPE_FILE;
}
size_t VFSFileSystem::ReadFile(u32 handle, u8 *pointer, s64 size) {
INFO_LOG(FILESYS,"VFSFileSystem::ReadFile %08x %p %i", handle, pointer, (u32)size);
EntryMap::iterator iter = entries.find(handle);