summaryrefslogtreecommitdiffstats
path: root/sbin/camcontrol
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2012-06-04 10:42:09 +0000
committermav <mav@FreeBSD.org>2012-06-04 10:42:09 +0000
commitfb116304c2fa719308e91ca5cefc45a9a3fad577 (patch)
treecb5fa6ba587b364f43a114ea73801f7ce1803b30 /sbin/camcontrol
parente5ff9bbfd5d205e3c9d21f158a851180fb52dd4e (diff)
downloadFreeBSD-src-fb116304c2fa719308e91ca5cefc45a9a3fad577.zip
FreeBSD-src-fb116304c2fa719308e91ca5cefc45a9a3fad577.tar.gz
Add -p argument for `camcontrol debug` to allow enabling CAM_DEBUG_PROBE
added at r208911.
Diffstat (limited to 'sbin/camcontrol')
-rw-r--r--sbin/camcontrol/camcontrol.85
-rw-r--r--sbin/camcontrol/camcontrol.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/sbin/camcontrol/camcontrol.8 b/sbin/camcontrol/camcontrol.8
index fdcec66..a79e9b1 100644
--- a/sbin/camcontrol/camcontrol.8
+++ b/sbin/camcontrol/camcontrol.8
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 24, 2011
+.Dd June 4, 2012
.Dt CAMCONTROL 8
.Os
.Sh NAME
@@ -175,6 +175,7 @@
.Op Fl S
.Op Fl X
.Op Fl c
+.Op Fl p
.Aq all|off|bus Ns Op :target Ns Op :lun
.Nm
.Ic tags
@@ -796,6 +797,8 @@ Enable CAM_DEBUG_XPT printfs.
Enable CAM_DEBUG_CDB printfs.
This will cause the kernel to print out the
SCSI CDBs sent to the specified device(s).
+.It Fl p
+Enable CAM_DEBUG_PROBE printfs.
.It all
Enable debugging for all devices.
.It off
diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c
index 8deb8e9..cfbda59 100644
--- a/sbin/camcontrol/camcontrol.c
+++ b/sbin/camcontrol/camcontrol.c
@@ -123,6 +123,7 @@ typedef enum {
CAM_ARG_DEBUG_CDB = 0x08000000,
CAM_ARG_DEBUG_XPT = 0x10000000,
CAM_ARG_DEBUG_PERIPH = 0x20000000,
+ CAM_ARG_DEBUG_PROBE = 0x40000000,
} cam_argmask;
struct camcontrol_opts {
@@ -176,7 +177,7 @@ static struct camcontrol_opts option_table[] = {
{"tags", CAM_CMD_TAG, CAM_ARG_NONE, "N:q"},
{"negotiate", CAM_CMD_RATE, CAM_ARG_NONE, negotiate_opts},
{"rate", CAM_CMD_RATE, CAM_ARG_NONE, negotiate_opts},
- {"debug", CAM_CMD_DEBUG, CAM_ARG_NONE, "IPTSXc"},
+ {"debug", CAM_CMD_DEBUG, CAM_ARG_NONE, "IPTSXcp"},
{"format", CAM_CMD_FORMAT, CAM_ARG_NONE, "qrwy"},
{"idle", CAM_CMD_IDLE, CAM_ARG_NONE, "t:"},
{"standby", CAM_CMD_STANDBY, CAM_ARG_NONE, "t:"},
@@ -2640,6 +2641,10 @@ camdebug(int argc, char **argv, char *combinedopt)
arglist |= CAM_ARG_DEBUG_CDB;
ccb.cdbg.flags |= CAM_DEBUG_CDB;
break;
+ case 'p':
+ arglist |= CAM_ARG_DEBUG_PROBE;
+ ccb.cdbg.flags |= CAM_DEBUG_PROBE;
+ break;
default:
break;
}
@@ -2669,7 +2674,7 @@ camdebug(int argc, char **argv, char *combinedopt)
ccb.cdbg.flags = CAM_DEBUG_NONE;
arglist &= ~(CAM_ARG_DEBUG_INFO|CAM_ARG_DEBUG_PERIPH|
CAM_ARG_DEBUG_TRACE|CAM_ARG_DEBUG_SUBTRACE|
- CAM_ARG_DEBUG_XPT);
+ CAM_ARG_DEBUG_XPT|CAM_ARG_DEBUG_PROBE);
} else if (strncmp(tstr, "all", 3) != 0) {
tmpstr = (char *)strtok(tstr, ":");
if ((tmpstr != NULL) && (*tmpstr != '\0')){
OpenPOWER on IntegriCloud