summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2014-01-20 23:56:49 +0000
committermav <mav@FreeBSD.org>2014-01-20 23:56:49 +0000
commit5f170995ac7c7d0494bcfe42617b88ec2286ffb7 (patch)
treefb7784a1530e8faf1a99a65f60a038fa165937bd /sys/cam
parent0b6cdba729d365b83f3a36ac8c5d3af010eff888 (diff)
downloadFreeBSD-src-5f170995ac7c7d0494bcfe42617b88ec2286ffb7.zip
FreeBSD-src-5f170995ac7c7d0494bcfe42617b88ec2286ffb7.tar.gz
MFC r260407:
Allow delete_method sysctl to be set to "DISABLE".
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/scsi/scsi_da.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index ee9b220..741a492 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -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);
OpenPOWER on IntegriCloud