svn commit: r194896 - in stable/7/sys: . dev/fdc

Joerg Wunsch joerg at FreeBSD.org
Wed Jun 24 20:22:48 UTC 2009


Author: joerg
Date: Wed Jun 24 20:22:46 2009
New Revision: 194896
URL: http://svn.freebsd.org/changeset/base/194896

Log:
  Do not insist on the fd being read/write for the FD_SOPTS and FD_STYPE
  ioctls, so they can be applied to read/only media.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/dev/fdc/fdc.c

Modified: stable/7/sys/dev/fdc/fdc.c
==============================================================================
--- stable/7/sys/dev/fdc/fdc.c	Wed Jun 24 20:06:16 2009	(r194895)
+++ stable/7/sys/dev/fdc/fdc.c	Wed Jun 24 20:22:46 2009	(r194896)
@@ -1498,8 +1498,6 @@ fd_ioctl(struct g_provider *pp, u_long c
 		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 c
 		return (0);
 
 	case FD_SOPTS:			/* set drive options */
-		if (!(fflag & FWRITE))
-			return (EPERM);
 		fd->options = *(int *)data;
 		return (0);
 


More information about the svn-src-stable-7 mailing list