1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00

With the fdc control device disappearing some 5 years ago, it is no

longer useful for the FD_STYPE and FD_SOPTS ioctls to insist on being
issued on a writable file descriptor.  Otherwise, there's no longer a
chance to set the drive type or options when a read-only medium is
present in the drive, as there is no way to obtain a writable fd then.
This commit is contained in:
Joerg Wunsch 2009-06-24 19:30:31 +00:00
parent f64d65b27e
commit 3fdc1d5c48
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=194891

View File

@ -1498,8 +1498,6 @@ fd_ioctl(struct g_provider *pp, u_long cmd, void *data, int fflag, struct thread
return (0);
case FD_STYPE: /* set drive type */
if (!(fflag & FWRITE))
return (EPERM);
/*
* Allow setting drive type temporarily iff
* currently unset. Used for fdformat so any
@ -1521,8 +1519,6 @@ fd_ioctl(struct g_provider *pp, u_long cmd, void *data, int fflag, struct thread
return (0);
case FD_SOPTS: /* set drive options */
if (!(fflag & FWRITE))
return (EPERM);
fd->options = *(int *)data;
return (0);