Fix fsdev_set_default_device bug

This commit is contained in:
TuxSH 2018-05-07 14:25:01 +02:00
parent ae78ee22da
commit 25db9fcc4a

View file

@ -124,10 +124,6 @@ int fsdev_mount_device(const char *name, unsigned int id) {
}
int fsdev_set_default_device(const char *name) {
#if FF_VOLUMES < 2
return 0;
#else
int ret;
char drname[40];
int devid = FindDevice(name);
@ -137,17 +133,20 @@ int fsdev_set_default_device(const char *name) {
return -1;
}
#if FF_VOLUMES < 2
ret = 0;
#else
strcpy(drname, name);
strcat(drname, ":");
ret = fsdev_convert_rc(NULL, f_chdrive(drname));
#endif
if (ret == 0) {
setDefaultDevice(devid);
}
return ret;
#endif
}
int fsdev_unmount_device(const char *name) {