From owner-svn-src-all@FreeBSD.ORG Tue Jan 7 20:12:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C36D0769; Tue, 7 Jan 2014 20:12:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A78B3197B; Tue, 7 Jan 2014 20:12:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s07KCAwP075648; Tue, 7 Jan 2014 20:12:10 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s07KCAQ8075647; Tue, 7 Jan 2014 20:12:10 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401072012.s07KCAQ8075647@svn.freebsd.org> From: Alexander Motin Date: Tue, 7 Jan 2014 20:12:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260407 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jan 2014 20:12:10 -0000 Author: mav Date: Tue Jan 7 20:12:10 2014 New Revision: 260407 URL: http://svnweb.freebsd.org/changeset/base/260407 Log: Allow delete_method sysctl to be set to "DISABLE". Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Tue Jan 7 20:12:02 2014 (r260406) +++ head/sys/cam/scsi/scsi_da.c Tue Jan 7 20:12:10 2014 (r260407) @@ -1959,7 +1959,7 @@ dadeletemethodsysctl(SYSCTL_HANDLER_ARGS char buf[16]; const char *p; struct da_softc *softc; - int i, error, value; + int i, error, methods, value; softc = (struct da_softc *)arg1; @@ -1972,8 +1972,9 @@ dadeletemethodsysctl(SYSCTL_HANDLER_ARGS error = sysctl_handle_string(oidp, buf, sizeof(buf), req); if (error != 0 || req->newptr == NULL) return (error); + methods = softc->delete_available | (1 << DA_DELETE_DISABLE); for (i = 0; i <= DA_DELETE_MAX; i++) { - if (!(softc->delete_available & (1 << i)) || + if (!(methods & (1 << i)) || strcmp(buf, da_delete_method_names[i]) != 0) continue; dadeletemethodset(softc, i);