From 3fdc1d5c487e0702b4890584f1195d567ec9ed31 Mon Sep 17 00:00:00 2001 From: Joerg Wunsch <joerg@FreeBSD.org> Date: Wed, 24 Jun 2009 19:30:31 +0000 Subject: [PATCH] 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. --- sys/dev/fdc/fdc.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index 08b7897f8e7a..a207bfcbc02c 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -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);