Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F165181504
D27812.id84697.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
6 KB
Referenced Files
None
Subscribers
None
D27812.id84697.diff
View Options
diff --git a/sbin/camcontrol/attrib.c b/sbin/camcontrol/attrib.c
--- a/sbin/camcontrol/attrib.c
+++ b/sbin/camcontrol/attrib.c
@@ -138,8 +138,6 @@
goto bailout;
}
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio);
-
STAILQ_INIT(&write_attr_list);
/*
diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c
--- a/sbin/camcontrol/camcontrol.c
+++ b/sbin/camcontrol/camcontrol.c
@@ -1021,9 +1021,6 @@
return (1);
}
- /* cam_getccb cleans up the header, caller has to zero the payload */
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio);
-
inq_buf = (struct scsi_inquiry_data *)malloc(
sizeof(struct scsi_inquiry_data));
@@ -1131,9 +1128,6 @@
return (1);
}
- /* cam_getccb cleans up the header, caller has to zero the payload */
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio);
-
serial_buf = (struct scsi_vpd_unit_serial_number *)
malloc(sizeof(*serial_buf));
@@ -1218,8 +1212,6 @@
return (1);
}
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cts);
-
ccb->ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
ccb->cts.type = CTS_TYPE_CURRENT_SETTINGS;
@@ -4480,8 +4472,6 @@
if (ccb == NULL)
errx(1, "mode_select: couldn't allocate CCB");
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio);
-
scsi_mode_select_len(&ccb->csio,
/* retries */ retry_count,
/* cbfcnp */ NULL,
@@ -4620,8 +4610,6 @@
return (1);
}
- CCB_CLEAR_ALL_EXCEPT_HDR(ccb);
-
while ((c = getopt(argc, argv, combinedopt)) != -1) {
switch(c) {
case 'a':
@@ -5106,7 +5094,6 @@
cam_path_string(device, pathstr, sizeof(pathstr));
if (numtags >= 0) {
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->crs);
ccb->ccb_h.func_code = XPT_REL_SIMQ;
ccb->ccb_h.flags = CAM_DEV_QFREEZE;
ccb->crs.release_flags = RELSIM_ADJUST_OPENINGS;
@@ -5350,7 +5337,6 @@
warnx("get_cpi: couldn't allocate CCB");
return (1);
}
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cpi);
ccb->ccb_h.func_code = XPT_PATH_INQ;
if (cam_send_ccb(device, ccb) < 0) {
warn("get_cpi: error sending Path Inquiry CCB");
@@ -5385,7 +5371,6 @@
warnx("get_cgd: couldn't allocate CCB");
return (1);
}
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cgd);
ccb->ccb_h.func_code = XPT_GDEV_TYPE;
if (cam_send_ccb(device, ccb) < 0) {
warn("get_cgd: error sending Get type information CCB");
@@ -5426,9 +5411,6 @@
goto bailout;
}
- /* cam_getccb cleans up the header, caller has to zero the payload */
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio);
-
bzero(&sup_pages, sizeof(sup_pages));
scsi_inquiry(&ccb->csio,
@@ -5963,8 +5945,6 @@
return (1);
}
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cts);
-
ccb->ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
if (user_settings == 0)
@@ -6107,7 +6087,6 @@
*/
if ((retval = get_cpi(device, &cpi)) != 0)
goto ratecontrol_bailout;
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cts);
if (quiet == 0) {
fprintf(stdout, "%s parameters:\n",
user_settings ? "User" : "Current");
@@ -6356,8 +6335,6 @@
return (1);
}
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio);
-
while ((c = getopt(argc, argv, combinedopt)) != -1) {
switch(c) {
case 'q':
@@ -6851,8 +6828,6 @@
return (1);
}
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio);
-
while ((c = getopt(argc, argv, combinedopt)) != -1) {
switch(c) {
case 'a':
@@ -7209,8 +7184,6 @@
return (1);
}
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio);
-
countonly = 0;
lunsonly = 0;
@@ -7453,8 +7426,6 @@
return (1);
}
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio);
-
while ((c = getopt(argc, argv, combinedopt)) != -1) {
switch (c) {
case 'b':
@@ -7654,8 +7625,6 @@
return (1);
}
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio);
-
while ((c = getopt(argc, argv, combinedopt)) != -1) {
switch (c) {
case 'R':
@@ -8203,8 +8172,6 @@
return (1);
}
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio);
-
while ((c = getopt(argc, argv, combinedopt)) != -1) {
switch (c) {
case 'l':
@@ -8347,8 +8314,6 @@
return (1);
}
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio);
-
while ((c = getopt(argc, argv, combinedopt)) != -1) {
switch (c) {
case 'a':
@@ -8604,8 +8569,6 @@
return (1);
}
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio);
-
while ((c = getopt(argc, argv, combinedopt)) != -1) {
switch (c) {
case 'l':
@@ -8698,8 +8661,6 @@
goto bailout;
}
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cdai);
-
/*
* On the first try, we just probe for the size of the data, and
* then allocate that much memory and try again.
@@ -8983,7 +8944,6 @@
return (1);
}
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio);
STAILQ_INIT(&devlist.dev_queue);
rgrequest = malloc(sizeof(*rgrequest));
@@ -9448,9 +9408,6 @@
goto bailout;
}
- /* cam_getccb cleans up the header, caller has to zero the payload */
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio);
-
if (opcode_set != 0) {
options |= RSO_OPTIONS_OC;
num_opcodes = 1;
@@ -9888,8 +9845,6 @@
return (1);
}
- CCB_CLEAR_ALL_EXCEPT_HDR(ccb);
-
ccb->ccb_h.func_code = XPT_REPROBE_LUN;
if (cam_send_ccb(device, ccb) < 0) {
diff --git a/sbin/camcontrol/epc.c b/sbin/camcontrol/epc.c
--- a/sbin/camcontrol/epc.c
+++ b/sbin/camcontrol/epc.c
@@ -633,8 +633,6 @@
goto bailout;
}
- CCB_CLEAR_ALL_EXCEPT_HDR(ccb);
-
while ((c = getopt(argc, argv, combinedopt)) != -1) {
switch (c) {
case 'c': {
diff --git a/sbin/camcontrol/fwdownload.c b/sbin/camcontrol/fwdownload.c
--- a/sbin/camcontrol/fwdownload.c
+++ b/sbin/camcontrol/fwdownload.c
@@ -465,9 +465,6 @@
goto bailout;
}
- /* cam_getccb cleans up the header, caller has to zero the payload */
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio);
-
bzero(&vpd_page, sizeof(vpd_page));
scsi_inquiry(&ccb->csio,
@@ -671,8 +668,6 @@
goto bailout;
}
- CCB_CLEAR_ALL_EXCEPT_HDR(ccb);
-
if (devtype != CC_DT_SCSI) {
dxfer_len = sizeof(struct ata_params);
@@ -802,8 +797,6 @@
goto bailout;
}
- CCB_CLEAR_ALL_EXCEPT_HDR(ccb);
-
max_pkt_size = vp->max_pkt_size;
if (max_pkt_size == 0)
max_pkt_size = UNKNOWN_MAX_PKT_SIZE;
diff --git a/sbin/camcontrol/persist.c b/sbin/camcontrol/persist.c
--- a/sbin/camcontrol/persist.c
+++ b/sbin/camcontrol/persist.c
@@ -453,8 +453,6 @@
goto bailout;
}
- CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio);
-
while ((c = getopt(argc, argv, combinedopt)) != -1) {
switch (c) {
case 'a':
diff --git a/sbin/camcontrol/zone.c b/sbin/camcontrol/zone.c
--- a/sbin/camcontrol/zone.c
+++ b/sbin/camcontrol/zone.c
@@ -347,8 +347,6 @@
goto bailout;
}
- CCB_CLEAR_ALL_EXCEPT_HDR(ccb);
-
while ((c = getopt(argc, argv, combinedopt)) != -1) {
switch (c) {
case 'a':
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 7, 2:31 PM (2 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36182105
Default Alt Text
D27812.id84697.diff (6 KB)
Attached To
Mode
D27812: camcontrol(8): remove unnecessary CCB zeroing
Attached
Detach File
Event Timeline
Log In to Comment