Fixed romfsUnmount RemoveDevice handling.

This commit is contained in:
yellows8 2019-06-13 19:41:35 -04:00
parent 0d17c53d00
commit 006ebc0633
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43

View File

@ -418,13 +418,18 @@ static void romfsInitMtime(romfs_mount *mount)
Result romfsUnmount(const char *name) Result romfsUnmount(const char *name)
{ {
romfs_mount *mount; romfs_mount *mount;
char tmpname[34];
mount = romfsFindMount(name); mount = romfsFindMount(name);
if (mount == NULL) if (mount == NULL)
return -1; return -1;
// Remove device // Remove device
RemoveDevice(name); memset(tmpname, 0, sizeof(tmpname));
strncpy(tmpname, mount->name, sizeof(tmpname)-2);
strncat(tmpname, ":", sizeof(tmpname)-strlen(tmpname)-1);
RemoveDevice(tmpname);
romfs_mountclose(mount); romfs_mountclose(mount);