Index: sbin/camcontrol/camcontrol.c =================================================================== --- sbin/camcontrol/camcontrol.c +++ 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; @@ -1825,8 +1817,6 @@ ata_flags |= AP_FLAG_TLEN_NO_DATA; } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); - scsi_ata_pass_16(&ccb->csio, retries, NULL, @@ -4481,8 +4471,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, @@ -4621,8 +4609,6 @@ return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(ccb); - while ((c = getopt(argc, argv, combinedopt)) != -1) { switch(c) { case 'a': @@ -5107,7 +5093,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; @@ -5351,7 +5336,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"); @@ -5386,7 +5370,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"); @@ -5427,9 +5410,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, @@ -5959,8 +5939,6 @@ return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cts); - ccb->ccb_h.func_code = XPT_GET_TRAN_SETTINGS; if (user_settings == 0) @@ -6103,7 +6081,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"); @@ -6352,8 +6329,6 @@ return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); - while ((c = getopt(argc, argv, combinedopt)) != -1) { switch(c) { case 'q': @@ -6847,8 +6822,6 @@ return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); - while ((c = getopt(argc, argv, combinedopt)) != -1) { switch(c) { case 'a': @@ -7205,8 +7178,6 @@ return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); - countonly = 0; lunsonly = 0; @@ -7449,8 +7420,6 @@ return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); - while ((c = getopt(argc, argv, combinedopt)) != -1) { switch (c) { case 'b': @@ -7650,8 +7619,6 @@ return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio); - while ((c = getopt(argc, argv, combinedopt)) != -1) { switch (c) { case 'R': @@ -8199,8 +8166,6 @@ return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio); - while ((c = getopt(argc, argv, combinedopt)) != -1) { switch (c) { case 'l': @@ -8343,8 +8308,6 @@ return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio); - while ((c = getopt(argc, argv, combinedopt)) != -1) { switch (c) { case 'a': @@ -8600,8 +8563,6 @@ return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio); - while ((c = getopt(argc, argv, combinedopt)) != -1) { switch (c) { case 'l': @@ -8694,8 +8655,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. @@ -8979,7 +8938,6 @@ return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->smpio); STAILQ_INIT(&devlist.dev_queue); rgrequest = malloc(sizeof(*rgrequest)); @@ -9444,9 +9402,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; @@ -9884,8 +9839,6 @@ return (1); } - CCB_CLEAR_ALL_EXCEPT_HDR(ccb); - ccb->ccb_h.func_code = XPT_REPROBE_LUN; if (cam_send_ccb(device, ccb) < 0) {