mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-26 16:31:11 +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
|
||||
// seconds to complete
|
||||
static const char eject_cmd[] = "/usr/sbin/diskutil eject %s 2>&1 >/dev/null";
|
||||
char *cmd = (char *)alloca(strlen(eject_cmd) + strlen(fh->ioctl_name) + 1);
|
||||
sprintf(cmd, eject_cmd, fh->ioctl_name);
|
||||
system(cmd);
|
||||
if (fh->ioctl_name) {
|
||||
static const char eject_cmd[] = "/usr/sbin/diskutil eject %s 2>&1 >/dev/null";
|
||||
char *cmd = (char *)alloca(strlen(eject_cmd) + strlen(fh->ioctl_name) + 1);
|
||||
sprintf(cmd, eject_cmd, fh->ioctl_name);
|
||||
system(cmd);
|
||||
}
|
||||
}
|
||||
fh->is_media_present = false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user