From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 24 20:22:47 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86A6E10656A5; Wed, 24 Jun 2009 20:22:47 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73B268FC13; Wed, 24 Jun 2009 20:22:47 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5OKMlSB027499; Wed, 24 Jun 2009 20:22:47 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5OKMlSK027497; Wed, 24 Jun 2009 20:22:47 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <200906242022.n5OKMlSK027497@svn.freebsd.org> From: Joerg Wunsch Date: Wed, 24 Jun 2009 20:22:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194896 - in stable/7/sys: . dev/fdc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2009 20:22:48 -0000 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);