mirror of https://github.com/bochs-emu/Bochs
- applied patch from Don Becker. Bypass fstat when opening WIN32 raw
floppy disk.
This commit is contained in:
parent
955b0a924f
commit
cf780f13ce
|
@ -1177,12 +1177,19 @@ bx_floppy_ctrl_c::evaluate_media(unsigned type, char *path, floppy_t *media)
|
|||
return(0);
|
||||
}
|
||||
|
||||
#ifdef macintosh
|
||||
#if BX_WITH_MACOS
|
||||
if (!strcmp(bx_options.floppya.path, SuperDrive))
|
||||
ret = fd_stat(&stat_buf);
|
||||
else
|
||||
#endif
|
||||
ret = fstat(media->fd, &stat_buf);
|
||||
#elif BX_WITH_WIN32
|
||||
stat_buf.st_mode = S_IFCHR;
|
||||
// maybe replace with code that sets ret to -1 if the disk is not available
|
||||
ret = 0;
|
||||
#else
|
||||
// unix
|
||||
ret = fstat(media->fd, &stat_buf);
|
||||
#endif
|
||||
if (ret) {
|
||||
perror("fstat'ing floppy 0 drive image file");
|
||||
bx_panic("fstat() returns error!\n");
|
||||
|
|
Loading…
Reference in New Issue