mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-09-29 21:56:26 +00:00
don't try to run diskutil eject (null)
This commit is contained in:
parent
62eaaee1b2
commit
588a2ae9cd
10
BasiliskII/src/Unix/sys_unix.cpp
Normal file → Executable file
10
BasiliskII/src/Unix/sys_unix.cpp
Normal file → Executable file
@ -883,10 +883,12 @@ void SysEject(void *arg)
|
|||||||
|
|
||||||
// Try to use "diskutil eject" but it can take up to 5
|
// Try to use "diskutil eject" but it can take up to 5
|
||||||
// seconds to complete
|
// seconds to complete
|
||||||
static const char eject_cmd[] = "/usr/sbin/diskutil eject %s 2>&1 >/dev/null";
|
if (fh->ioctl_name) {
|
||||||
char *cmd = (char *)alloca(strlen(eject_cmd) + strlen(fh->ioctl_name) + 1);
|
static const char eject_cmd[] = "/usr/sbin/diskutil eject %s 2>&1 >/dev/null";
|
||||||
sprintf(cmd, eject_cmd, fh->ioctl_name);
|
char *cmd = (char *)alloca(strlen(eject_cmd) + strlen(fh->ioctl_name) + 1);
|
||||||
system(cmd);
|
sprintf(cmd, eject_cmd, fh->ioctl_name);
|
||||||
|
system(cmd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fh->is_media_present = false;
|
fh->is_media_present = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user