Date: Tue, 21 Jan 2014 00:34:37 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260966 - stable/9/sys/cam/scsi Message-ID: <201401210034.s0L0YbLl072546@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Tue Jan 21 00:34:37 2014 New Revision: 260966 URL: http://svnweb.freebsd.org/changeset/base/260966 Log: MFC r260407: Allow delete_method sysctl to be set to "DISABLE". Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Tue Jan 21 00:31:31 2014 (r260965) +++ stable/9/sys/cam/scsi/scsi_da.c Tue Jan 21 00:34:37 2014 (r260966) @@ -1968,7 +1968,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; @@ -1981,8 +1981,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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401210034.s0L0YbLl072546>