Date: Thu, 8 Aug 2019 18:42:40 +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-11@freebsd.org Subject: svn commit: r350773 - stable/11/sbin/camcontrol Message-ID: <201908081842.x78IgeYv021412@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Thu Aug 8 18:42:39 2019 New Revision: 350773 URL: https://svnweb.freebsd.org/changeset/base/350773 Log: MFC r320861 (by ngie): Fix whitespace bugs - Delete trailing whitespace. - Replace 8 single column spaces with hard tabs. - Delete lines with consisting purely of blank space. - Add space between `return` and `(`, per style(9). Special care was taken to not blindly replace 8 single column spaces with tabs; doing so could break tools that do strict string comparisons with camcontrol output. Modified: stable/11/sbin/camcontrol/camcontrol.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/11/sbin/camcontrol/camcontrol.c Thu Aug 8 18:08:13 2019 (r350772) +++ stable/11/sbin/camcontrol/camcontrol.c Thu Aug 8 18:42:39 2019 (r350773) @@ -375,14 +375,14 @@ getoption(struct camcontrol_opts *table, char *arg, ui *argnum = opts->argnum; *subopt = opts->subopt; if (++num_matches > 1) - return(CC_OR_AMBIGUOUS); + return (CC_OR_AMBIGUOUS); } } if (num_matches > 0) - return(CC_OR_FOUND); + return (CC_OR_FOUND); else - return(CC_OR_NOT_FOUND); + return (CC_OR_NOT_FOUND); } #ifndef MINIMALISTIC @@ -404,7 +404,7 @@ getdevlist(struct cam_device *device) if (cam_send_ccb(device, ccb) < 0) { perror("error getting device list"); cam_freeccb(ccb); - return(1); + return (1); } status[0] = '\0'; @@ -442,7 +442,7 @@ getdevlist(struct cam_device *device) cam_freeccb(ccb); - return(error); + return (error); } #endif /* MINIMALISTIC */ @@ -471,7 +471,7 @@ getdevtree(int argc, char **argv, char *combinedopt) if ((fd = open(XPT_DEVICE, O_RDWR)) == -1) { warn("couldn't open %s", XPT_DEVICE); - return(1); + return (1); } bzero(&ccb, sizeof(union ccb)); @@ -487,7 +487,7 @@ getdevtree(int argc, char **argv, char *combinedopt) if (ccb.cdm.matches == NULL) { warnx("can't malloc memory for matches"); close(fd); - return(1); + return (1); } ccb.cdm.num_matches = 0; @@ -663,7 +663,7 @@ getdevtree(int argc, char **argv, char *combinedopt) close(fd); - return(error); + return (error); } #ifndef MINIMALISTIC @@ -699,7 +699,7 @@ testunitready(struct cam_device *device, int task_attr } cam_freeccb(ccb); - return(1); + return (1); } if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { @@ -718,7 +718,7 @@ testunitready(struct cam_device *device, int task_attr cam_freeccb(ccb); - return(error); + return (error); } static int @@ -768,7 +768,7 @@ scsistart(struct cam_device *device, int startstop, in } cam_freeccb(ccb); - return(1); + return (1); } if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) @@ -802,7 +802,7 @@ scsistart(struct cam_device *device, int startstop, in cam_freeccb(ccb); - return(error); + return (error); } int @@ -839,7 +839,7 @@ scsidoinquiry(struct cam_device *device, int argc, cha error = scsiinquiry(device, task_attr, retry_count, timeout); if (error != 0) - return(error); + return (error); if (arglist & CAM_ARG_GET_SERIAL) scsiserial(device, task_attr, retry_count, timeout); @@ -847,7 +847,7 @@ scsidoinquiry(struct cam_device *device, int argc, cha if (arglist & CAM_ARG_GET_XFERRATE) error = camxferrate(device); - return(error); + return (error); } static int @@ -862,7 +862,7 @@ scsiinquiry(struct cam_device *device, int task_attr, if (ccb == NULL) { warnx("couldn't allocate CCB"); - return(1); + return (1); } /* cam_getccb cleans up the header, caller has to zero the payload */ @@ -874,7 +874,7 @@ scsiinquiry(struct cam_device *device, int task_attr, if (inq_buf == NULL) { cam_freeccb(ccb); warnx("can't malloc memory for inquiry\n"); - return(1); + return (1); } bzero(inq_buf, sizeof(*inq_buf)); @@ -937,7 +937,7 @@ scsiinquiry(struct cam_device *device, int task_attr, } cam_freeccb(ccb); - return(1); + return (1); } if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { @@ -953,7 +953,7 @@ scsiinquiry(struct cam_device *device, int task_attr, if (error != 0) { free(inq_buf); - return(error); + return (error); } fprintf(stdout, "%s%d: ", device->device_name, @@ -962,7 +962,7 @@ scsiinquiry(struct cam_device *device, int task_attr, free(inq_buf); - return(0); + return (0); } static int @@ -978,7 +978,7 @@ scsiserial(struct cam_device *device, int task_attr, i if (ccb == NULL) { warnx("couldn't allocate CCB"); - return(1); + return (1); } /* cam_getccb cleans up the header, caller has to zero the payload */ @@ -990,7 +990,7 @@ scsiserial(struct cam_device *device, int task_attr, i if (serial_buf == NULL) { cam_freeccb(ccb); warnx("can't malloc memory for serial number"); - return(1); + return (1); } scsi_inquiry(&ccb->csio, @@ -1020,7 +1020,7 @@ scsiserial(struct cam_device *device, int task_attr, i cam_freeccb(ccb); free(serial_buf); - return(1); + return (1); } if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { @@ -1036,7 +1036,7 @@ scsiserial(struct cam_device *device, int task_attr, i if (error != 0) { free(serial_buf); - return(error); + return (error); } bcopy(serial_buf->serial_num, serial_num, serial_buf->length); @@ -1051,7 +1051,7 @@ scsiserial(struct cam_device *device, int task_attr, i free(serial_buf); - return(0); + return (0); } int @@ -1071,7 +1071,7 @@ camxferrate(struct cam_device *device) if (ccb == NULL) { warnx("couldn't allocate CCB"); - return(1); + return (1); } CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cts); @@ -1210,13 +1210,13 @@ camxferrate(struct cam_device *device) } } - fprintf(stdout, "\n"); + fprintf(stdout, "\n"); xferrate_bailout: cam_freeccb(ccb); - return(retval); + return (retval); } static void @@ -1239,7 +1239,7 @@ atahpa_print(struct ata_params *parm, u_int64_t hpasiz if (parm->support.command1 & ATA_SUPPORT_PROTECTED) { u_int64_t lba = lbasize48 ? lbasize48 : lbasize; printf("yes %s %ju/%ju\n", (hpasize > lba) ? "yes" : "no ", - lba, hpasize); + lba, hpasize); printf("HPA - Security "); if (parm->support.command1 & ATA_SUPPORT_MAXSECURITY) @@ -3040,8 +3040,7 @@ atasecurity(struct cam_device *device, int retry_count } error = atasecurity_erase(device, ccb, retry_count, - timeout, erase_timeout, &pwd, - quiet); + timeout, erase_timeout, &pwd, quiet); } else { warnx("Can't secure erase (security is disabled)"); error = 1; @@ -3134,7 +3133,7 @@ dorescan_or_reset(int argc, char **argv, int rescan) if (argc < 3) { warnx(must, rescan? "rescan" : "reset"); - return(1); + return (1); } tstr = argv[optind]; @@ -3146,7 +3145,7 @@ dorescan_or_reset(int argc, char **argv, int rescan) rv = parse_btl(argv[optind], &bus, &target, &lun, &arglist); if (rv != 1 && rv != 3) { warnx(must, rescan? "rescan" : "reset"); - return(1); + return (1); } } else { char name[30]; @@ -3254,7 +3253,7 @@ dorescan_or_reset(int argc, char **argv, int rescan) bailout: - return(error); + return (error); } static int @@ -3269,7 +3268,7 @@ rescan_or_reset_bus(path_id_t bus, int rescan) if ((fd = open(XPT_DEVICE, O_RDWR)) < 0) { warnx("error opening transport layer device %s", XPT_DEVICE); warn("%s", XPT_DEVICE); - return(1); + return (1); } ccb = malloc(sizeof(*ccb)); @@ -3434,7 +3433,7 @@ bailout: } free(ccb); - return(retval); + return (retval); } static int @@ -3448,17 +3447,17 @@ scanlun_or_reset_dev(path_id_t bus, target_id_t target if (bus == CAM_BUS_WILDCARD) { warnx("invalid bus number %d", bus); - return(1); + return (1); } if (target == CAM_TARGET_WILDCARD) { warnx("invalid target number %d", target); - return(1); + return (1); } if (lun == CAM_LUN_WILDCARD) { warnx("invalid lun number %jx", (uintmax_t)lun); - return(1); + return (1); } fd = -1; @@ -3470,13 +3469,13 @@ scanlun_or_reset_dev(path_id_t bus, target_id_t target warnx("error opening transport layer device %s\n", XPT_DEVICE); warn("%s", XPT_DEVICE); - return(1); + return (1); } } else { device = cam_open_btl(bus, target, lun, O_RDWR, NULL); if (device == NULL) { warnx("%s", cam_errbuf); - return(1); + return (1); } } @@ -3494,13 +3493,13 @@ scanlun_or_reset_dev(path_id_t bus, target_id_t target if (ioctl(fd, CAMIOCOMMAND, &ccb) < 0) { warn("CAMIOCOMMAND ioctl failed"); close(fd); - return(1); + return (1); } } else { if (cam_send_ccb(device, &ccb) < 0) { warn("error sending XPT_RESET_DEV CCB"); cam_close_device(device); - return(1); + return (1); } } @@ -3517,12 +3516,12 @@ scanlun_or_reset_dev(path_id_t bus, target_id_t target && ((ccb.ccb_h.status & CAM_STATUS_MASK) == CAM_BDR_SENT))) { fprintf(stdout, "%s of %d:%d:%jx was successful\n", scan? "Re-scan" : "Reset", bus, target, (uintmax_t)lun); - return(0); + return (0); } else { fprintf(stdout, "%s of %d:%d:%jx returned error %#x\n", scan? "Re-scan" : "Reset", bus, target, (uintmax_t)lun, ccb.ccb_h.status & CAM_STATUS_MASK); - return(1); + return (1); } } @@ -3754,7 +3753,7 @@ next_batch: error = 1; goto defect_bailout; break; - } + } max_possible_size = (hdr_max / entry_size) * entry_size; num_returned = returned_length / entry_size; @@ -4100,7 +4099,7 @@ defect_bailout: if (ccb != NULL) cam_freeccb(ccb); - return(error); + return (error); } #endif /* MINIMALISTIC */ @@ -4301,7 +4300,7 @@ scsicmd(struct cam_device *device, int argc, char **ar if (ccb == NULL) { warnx("scsicmd: error allocating ccb"); - return(1); + return (1); } CCB_CLEAR_ALL_EXCEPT_HDR(ccb); @@ -4501,7 +4500,7 @@ scsicmd(struct cam_device *device, int argc, char **ar case 3: case 6: case 7: - /* computed by buff_encode_visit */ + /* computed by buff_encode_visit */ break; case 4: cdb_len = 16; @@ -4630,7 +4629,7 @@ scsicmd_bailout: cam_freeccb(ccb); - return(error); + return (error); } static int @@ -4684,7 +4683,7 @@ camdebug(int argc, char **argv, char *combinedopt) if ((fd = open(XPT_DEVICE, O_RDWR)) < 0) { warnx("error opening transport layer device %s", XPT_DEVICE); warn("%s", XPT_DEVICE); - return(1); + return (1); } argc -= optind; argv += optind; @@ -4693,7 +4692,7 @@ camdebug(int argc, char **argv, char *combinedopt) warnx("you must specify \"off\", \"all\" or a bus,"); warnx("bus:target, or bus:target:lun"); close(fd); - return(1); + return (1); } tstr = *argv; @@ -4767,7 +4766,7 @@ camdebug(int argc, char **argv, char *combinedopt) close(fd); } - return(error); + return (error); } static int @@ -4785,7 +4784,7 @@ tagcontrol(struct cam_device *device, int argc, char * if (ccb == NULL) { warnx("tagcontrol: error allocating ccb"); - return(1); + return (1); } while ((c = getopt(argc, argv, combinedopt)) != -1) { @@ -4881,7 +4880,7 @@ tagcontrol(struct cam_device *device, int argc, char * tagcontrol_bailout: cam_freeccb(ccb); - return(retval); + return (retval); } static void @@ -5034,7 +5033,7 @@ get_cpi(struct cam_device *device, struct ccb_pathinq ccb = cam_getccb(device); if (ccb == NULL) { warnx("get_cpi: couldn't allocate CCB"); - return(1); + return (1); } CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cpi); ccb->ccb_h.func_code = XPT_PATH_INQ; @@ -5057,7 +5056,7 @@ get_cpi(struct cam_device *device, struct ccb_pathinq get_cpi_bailout: cam_freeccb(ccb); - return(retval); + return (retval); } /* @@ -5072,7 +5071,7 @@ get_cgd(struct cam_device *device, struct ccb_getdev * ccb = cam_getccb(device); if (ccb == NULL) { warnx("get_cgd: couldn't allocate CCB"); - return(1); + return (1); } CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cgd); ccb->ccb_h.func_code = XPT_GDEV_TYPE; @@ -5095,7 +5094,7 @@ get_cgd(struct cam_device *device, struct ccb_getdev * get_cgd_bailout: cam_freeccb(ccb); - return(retval); + return (retval); } /* @@ -5117,7 +5116,7 @@ dev_has_vpd_page(struct cam_device *dev, uint8_t page_ retval = -1; goto bailout; } - + /* cam_getccb cleans up the header, caller has to zero the payload */ CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); @@ -5164,7 +5163,7 @@ dev_has_vpd_page(struct cam_device *dev, uint8_t page_ bailout: if (ccb != NULL) cam_freeccb(ccb); - + return (retval); } @@ -5194,7 +5193,7 @@ get_device_type(struct cam_device *dev, int retry_coun break; /*NOTREACHED*/ default: *devtype = CC_DT_UNKNOWN; - goto bailout; + goto bailout; break; /*NOTREACHED*/ } @@ -5269,7 +5268,7 @@ build_ata_cmd(union ccb *ccb, uint32_t retry_count, ui /*protocol*/ protocol, /*ata_flags*/ ata_flags, /*features*/ features, - /*sector_count*/ sector_count, + /*sector_count*/ sector_count, /*lba*/ lba, /*command*/ command, /*device*/ 0, @@ -5301,7 +5300,7 @@ get_ata_status(struct cam_device *dev, union ccb *ccb, /* * In this case, we have SCSI ATA PASS-THROUGH command, 12 - * or 16 byte, and need to see what + * or 16 byte, and need to see what */ if (ccb->ccb_h.flags & CAM_CDB_POINTER) opcode = ccb->csio.cdb_io.cdb_ptr[0]; @@ -5351,7 +5350,7 @@ get_ata_status(struct cam_device *dev, union ccb *ccb, ((uint64_t)desc->lba_31_24 << 24) | (desc->lba_23_16 << 16) | (desc->lba_15_8 << 8) | - desc->lba_7_0; + desc->lba_7_0; *device = desc->device; *status = desc->status; @@ -5402,7 +5401,7 @@ get_ata_status(struct cam_device *dev, union ccb *ccb, res = &ccb->ataio.res; *error = res->error; *status = res->status; - *device = res->device; + *device = res->device; *count = res->sector_count; *lba = (res->lba_high << 16) | (res->lba_mid << 8) | @@ -5602,7 +5601,7 @@ get_print_cts(struct cam_device *device, int user_sett if (ccb == NULL) { warnx("get_print_cts: error allocating ccb"); - return(1); + return (1); } CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->cts); @@ -5642,7 +5641,7 @@ get_print_cts_bailout: cam_freeccb(ccb); - return(retval); + return (retval); } static int @@ -5665,7 +5664,7 @@ ratecontrol(struct cam_device *device, int task_attr, ccb = cam_getccb(device); if (ccb == NULL) { warnx("ratecontrol: error allocating ccb"); - return(1); + return (1); } while ((c = getopt(argc, argv, combinedopt)) != -1) { switch(c){ @@ -5997,7 +5996,7 @@ ratecontrol(struct cam_device *device, int task_attr, ratecontrol_bailout: cam_freeccb(ccb); - return(retval); + return (retval); } static int @@ -6021,7 +6020,7 @@ scsiformat(struct cam_device *device, int argc, char * if (ccb == NULL) { warnx("scsiformat: error allocating ccb"); - return(1); + return (1); } CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); @@ -6287,7 +6286,7 @@ scsiformat_bailout: cam_freeccb(ccb); - return(error); + return (error); } static int @@ -6316,7 +6315,7 @@ scsisanitize(struct cam_device *device, int argc, char if (ccb == NULL) { warnx("scsisanitize: error allocating ccb"); - return(1); + return (1); } CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio); @@ -6697,7 +6696,7 @@ scsisanitize_bailout: free(data_ptr); cam_freeccb(ccb); - return(error); + return (error); } static int @@ -7335,7 +7334,7 @@ smpcmd(struct cam_device *device, int argc, char **arg } else if ((amt_written == 0) && (amt_to_write > 0)) { warnx("only wrote %u bytes out of %u", - response_size - amt_to_write, + response_size - amt_to_write, response_size); } } @@ -7945,7 +7944,7 @@ buildbusdevlist(struct cam_devlist *devlist) if ((fd = open(XPT_DEVICE, O_RDWR)) == -1) { warn("couldn't open %s", XPT_DEVICE); - return(1); + return (1); } bzero(&ccb, sizeof(union ccb)); @@ -7961,7 +7960,7 @@ buildbusdevlist(struct cam_devlist *devlist) if (ccb.cdm.matches == NULL) { warnx("can't malloc memory for matches"); close(fd); - return(1); + return (1); } ccb.cdm.num_matches = 0; ccb.cdm.num_patterns = 2; @@ -8012,7 +8011,7 @@ buildbusdevlist(struct cam_devlist *devlist) case DEV_MATCH_DEVICE: { struct device_match_result *dev_result; - dev_result = + dev_result = &ccb.cdm.matches[i].result.device_result; if (dev_result->flags & @@ -8363,7 +8362,7 @@ smpphylist(struct cam_device *device, int argc, char * fprintf(stdout, "%s%d", item->periph_matches[j].periph_name, item->periph_matches[j].unit_number); - + } fprintf(stdout, ")\n"); } @@ -8565,7 +8564,7 @@ scsigetopcodes(struct cam_device *device, int opcode_s alloc_len += num_opcodes * sizeof(struct scsi_report_supported_opcodes_timeout); } - + if (sa_set != 0) { options |= RSO_OPTIONS_OC_SA; if (show_sa_errors != 0) @@ -8576,7 +8575,7 @@ retry_alloc: if (buf != NULL) { free(buf); buf = NULL; - } + } buf = malloc(alloc_len); if (buf == NULL) { @@ -8613,7 +8612,6 @@ retry_alloc: if (verbosemode != 0) cam_error_print(device, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); - retval = 1; goto bailout; } @@ -9599,167 +9597,167 @@ main(int argc, char **argv) switch(cmdlist) { #ifndef MINIMALISTIC - case CAM_CMD_DEVLIST: - error = getdevlist(cam_dev); - break; - case CAM_CMD_HPA: - error = atahpa(cam_dev, retry_count, timeout, - argc, argv, combinedopt); - break; + case CAM_CMD_DEVLIST: + error = getdevlist(cam_dev); + break; + case CAM_CMD_HPA: + error = atahpa(cam_dev, retry_count, timeout, + argc, argv, combinedopt); + break; #endif /* MINIMALISTIC */ - case CAM_CMD_DEVTREE: - error = getdevtree(argc, argv, combinedopt); - break; + case CAM_CMD_DEVTREE: + error = getdevtree(argc, argv, combinedopt); + break; #ifndef MINIMALISTIC - case CAM_CMD_TUR: - error = testunitready(cam_dev, task_attr, retry_count, - timeout, 0); - break; - case CAM_CMD_INQUIRY: - error = scsidoinquiry(cam_dev, argc, argv, combinedopt, - task_attr, retry_count, timeout); - break; - case CAM_CMD_IDENTIFY: - error = ataidentify(cam_dev, retry_count, timeout); - break; - case CAM_CMD_STARTSTOP: - error = scsistart(cam_dev, arglist & CAM_ARG_START_UNIT, - arglist & CAM_ARG_EJECT, task_attr, - retry_count, timeout); - break; + case CAM_CMD_TUR: + error = testunitready(cam_dev, task_attr, retry_count, + timeout, 0); + break; + case CAM_CMD_INQUIRY: + error = scsidoinquiry(cam_dev, argc, argv, combinedopt, + task_attr, retry_count, timeout); + break; + case CAM_CMD_IDENTIFY: + error = ataidentify(cam_dev, retry_count, timeout); + break; + case CAM_CMD_STARTSTOP: + error = scsistart(cam_dev, arglist & CAM_ARG_START_UNIT, + arglist & CAM_ARG_EJECT, task_attr, + retry_count, timeout); + break; #endif /* MINIMALISTIC */ - case CAM_CMD_RESCAN: - error = dorescan_or_reset(argc, argv, 1); - break; - case CAM_CMD_RESET: - error = dorescan_or_reset(argc, argv, 0); - break; + case CAM_CMD_RESCAN: + error = dorescan_or_reset(argc, argv, 1); + break; + case CAM_CMD_RESET: + error = dorescan_or_reset(argc, argv, 0); + break; #ifndef MINIMALISTIC - case CAM_CMD_READ_DEFECTS: - error = readdefects(cam_dev, argc, argv, combinedopt, - task_attr, retry_count, timeout); - break; - case CAM_CMD_MODE_PAGE: - modepage(cam_dev, argc, argv, combinedopt, - task_attr, retry_count, timeout); - break; - case CAM_CMD_SCSI_CMD: - error = scsicmd(cam_dev, argc, argv, combinedopt, - task_attr, retry_count, timeout); - break; - case CAM_CMD_SMP_CMD: - error = smpcmd(cam_dev, argc, argv, combinedopt, + case CAM_CMD_READ_DEFECTS: + error = readdefects(cam_dev, argc, argv, combinedopt, + task_attr, retry_count, timeout); + break; + case CAM_CMD_MODE_PAGE: + modepage(cam_dev, argc, argv, combinedopt, + task_attr, retry_count, timeout); + break; + case CAM_CMD_SCSI_CMD: + error = scsicmd(cam_dev, argc, argv, combinedopt, + task_attr, retry_count, timeout); + break; + case CAM_CMD_SMP_CMD: + error = smpcmd(cam_dev, argc, argv, combinedopt, + retry_count, timeout); + break; + case CAM_CMD_SMP_RG: + error = smpreportgeneral(cam_dev, argc, argv, + combinedopt, retry_count, + timeout); + break; + case CAM_CMD_SMP_PC: + error = smpphycontrol(cam_dev, argc, argv, combinedopt, + retry_count, timeout); + break; + case CAM_CMD_SMP_PHYLIST: + error = smpphylist(cam_dev, argc, argv, combinedopt, + retry_count, timeout); + break; + case CAM_CMD_SMP_MANINFO: + error = smpmaninfo(cam_dev, argc, argv, combinedopt, + retry_count, timeout); + break; + case CAM_CMD_DEBUG: + error = camdebug(argc, argv, combinedopt); + break; + case CAM_CMD_TAG: + error = tagcontrol(cam_dev, argc, argv, combinedopt); + break; + case CAM_CMD_RATE: + error = ratecontrol(cam_dev, task_attr, retry_count, + timeout, argc, argv, combinedopt); + break; + case CAM_CMD_FORMAT: + error = scsiformat(cam_dev, argc, argv, + combinedopt, task_attr, retry_count, + timeout); + break; + case CAM_CMD_REPORTLUNS: + error = scsireportluns(cam_dev, argc, argv, + combinedopt, task_attr, retry_count, timeout); - break; - case CAM_CMD_SMP_RG: - error = smpreportgeneral(cam_dev, argc, argv, - combinedopt, retry_count, - timeout); - break; - case CAM_CMD_SMP_PC: - error = smpphycontrol(cam_dev, argc, argv, combinedopt, - retry_count, timeout); - break; - case CAM_CMD_SMP_PHYLIST: - error = smpphylist(cam_dev, argc, argv, combinedopt, - retry_count, timeout); - break; - case CAM_CMD_SMP_MANINFO: - error = smpmaninfo(cam_dev, argc, argv, combinedopt, - retry_count, timeout); - break; - case CAM_CMD_DEBUG: - error = camdebug(argc, argv, combinedopt); - break; - case CAM_CMD_TAG: - error = tagcontrol(cam_dev, argc, argv, combinedopt); - break; - case CAM_CMD_RATE: - error = ratecontrol(cam_dev, task_attr, retry_count, - timeout, argc, argv, combinedopt); - break; - case CAM_CMD_FORMAT: - error = scsiformat(cam_dev, argc, argv, - combinedopt, task_attr, retry_count, - timeout); - break; - case CAM_CMD_REPORTLUNS: - error = scsireportluns(cam_dev, argc, argv, - combinedopt, task_attr, - retry_count, timeout); - break; - case CAM_CMD_READCAP: - error = scsireadcapacity(cam_dev, argc, argv, - combinedopt, task_attr, - retry_count, timeout); - break; - case CAM_CMD_IDLE: - case CAM_CMD_STANDBY: - case CAM_CMD_SLEEP: - error = atapm(cam_dev, argc, argv, - combinedopt, retry_count, timeout); - break; - case CAM_CMD_APM: - case CAM_CMD_AAM: - error = ataaxm(cam_dev, argc, argv, - combinedopt, retry_count, timeout); - break; - case CAM_CMD_SECURITY: - error = atasecurity(cam_dev, retry_count, timeout, - argc, argv, combinedopt); - break; - case CAM_CMD_DOWNLOAD_FW: - error = fwdownload(cam_dev, argc, argv, combinedopt, - arglist & CAM_ARG_VERBOSE, task_attr, retry_count, - timeout); - break; - case CAM_CMD_SANITIZE: - error = scsisanitize(cam_dev, argc, argv, - combinedopt, task_attr, - retry_count, timeout); - break; - case CAM_CMD_PERSIST: - error = scsipersist(cam_dev, argc, argv, combinedopt, - task_attr, retry_count, timeout, - arglist & CAM_ARG_VERBOSE, - arglist & CAM_ARG_ERR_RECOVER); - break; - case CAM_CMD_ATTRIB: - error = scsiattrib(cam_dev, argc, argv, combinedopt, - task_attr, retry_count, timeout, - arglist & CAM_ARG_VERBOSE, - arglist & CAM_ARG_ERR_RECOVER); - break; - case CAM_CMD_OPCODES: - error = scsiopcodes(cam_dev, argc, argv, combinedopt, - task_attr, retry_count, timeout, - arglist & CAM_ARG_VERBOSE); - break; - case CAM_CMD_REPROBE: - error = scsireprobe(cam_dev); - break; - case CAM_CMD_ZONE: - error = zone(cam_dev, argc, argv, combinedopt, - task_attr, retry_count, timeout, - arglist & CAM_ARG_VERBOSE); - break; - case CAM_CMD_EPC: - error = epc(cam_dev, argc, argv, combinedopt, - retry_count, timeout, arglist & CAM_ARG_VERBOSE); - break; - case CAM_CMD_TIMESTAMP: - error = timestamp(cam_dev, argc, argv, combinedopt, - task_attr, retry_count, timeout, - arglist & CAM_ARG_VERBOSE); - break; + break; + case CAM_CMD_READCAP: + error = scsireadcapacity(cam_dev, argc, argv, + combinedopt, task_attr, + retry_count, timeout); + break; + case CAM_CMD_IDLE: + case CAM_CMD_STANDBY: + case CAM_CMD_SLEEP: + error = atapm(cam_dev, argc, argv, + combinedopt, retry_count, timeout); + break; + case CAM_CMD_APM: + case CAM_CMD_AAM: + error = ataaxm(cam_dev, argc, argv, + combinedopt, retry_count, timeout); + break; + case CAM_CMD_SECURITY: + error = atasecurity(cam_dev, retry_count, timeout, + argc, argv, combinedopt); + break; + case CAM_CMD_DOWNLOAD_FW: + error = fwdownload(cam_dev, argc, argv, combinedopt, + arglist & CAM_ARG_VERBOSE, task_attr, retry_count, + timeout); + break; + case CAM_CMD_SANITIZE: + error = scsisanitize(cam_dev, argc, argv, + combinedopt, task_attr, + retry_count, timeout); + break; + case CAM_CMD_PERSIST: + error = scsipersist(cam_dev, argc, argv, combinedopt, + task_attr, retry_count, timeout, + arglist & CAM_ARG_VERBOSE, + arglist & CAM_ARG_ERR_RECOVER); + break; + case CAM_CMD_ATTRIB: + error = scsiattrib(cam_dev, argc, argv, combinedopt, + task_attr, retry_count, timeout, + arglist & CAM_ARG_VERBOSE, + arglist & CAM_ARG_ERR_RECOVER); + break; + case CAM_CMD_OPCODES: + error = scsiopcodes(cam_dev, argc, argv, combinedopt, + task_attr, retry_count, timeout, + arglist & CAM_ARG_VERBOSE); + break; + case CAM_CMD_REPROBE: + error = scsireprobe(cam_dev); + break; + case CAM_CMD_ZONE: + error = zone(cam_dev, argc, argv, combinedopt, + task_attr, retry_count, timeout, + arglist & CAM_ARG_VERBOSE); + break; + case CAM_CMD_EPC: + error = epc(cam_dev, argc, argv, combinedopt, + retry_count, timeout, arglist & CAM_ARG_VERBOSE); + break; + case CAM_CMD_TIMESTAMP: + error = timestamp(cam_dev, argc, argv, combinedopt, *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908081842.x78IgeYv021412>