diff options
| author | Yaroslav Tykhiy <ytykhiy@gmail.com> | 2003-06-15 16:18:58 +0000 |
|---|---|---|
| committer | Yaroslav Tykhiy <ytykhiy@gmail.com> | 2003-06-15 16:18:58 +0000 |
| commit | 29ec21d1e3062f269e6ec330f559b54d5ef909a3 (patch) | |
| tree | 9b247ad85f6cc3a24ebbe7a8cbda9441fb14aadd /sys/dev | |
| parent | 2bceb0f2b2920b80d8ce28172be1dc116bf0010f (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/fdc/fdc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index f4068eff44393..b6ec2c34fcb13 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -2622,10 +2622,14 @@ fdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) switch (cmd) { case DIOCGMEDIASIZE: + if (fd->ft == 0) + return ((fd->flags & FD_NONBLOCK) ? EAGAIN : ENXIO); *(off_t *)addr = (128 << (fd->ft->secsize)) * fd->ft->size; return (0); case DIOCGSECTORSIZE: + if (fd->ft == 0) + return ((fd->flags & FD_NONBLOCK) ? EAGAIN : ENXIO); *(u_int *)addr = 128 << (fd->ft->secsize); return (0); |
