Date: Sun, 1 Dec 2024 04:57:51 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: c93b892f71cf - stable/13 - ctl_report_supported_opcodes: Rename invalid label to invalid_options Message-ID: <202412010457.4B14vpXf097144@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c93b892f71cfe1e624b82adbba8492e460a8f235 commit c93b892f71cfe1e624b82adbba8492e460a8f235 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2024-09-25 14:20:22 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2024-11-30 21:38:28 +0000 ctl_report_supported_opcodes: Rename invalid label to invalid_options This error handling is specific to an invalid value in the REPORTING OPTIONS field of a REPORT SUPPORTED OPERATION CODES command. While here, reuse the label for another case. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D46775 (cherry picked from commit 0063ef79f9e6b9ad47969af3b94ae63e7888852c) --- sys/cam/ctl/ctl.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 13b7995fd74c..02feb19cd8f0 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -7493,33 +7493,26 @@ ctl_report_supported_opcodes(struct ctl_scsiio *ctsio) break; case RSO_OPTIONS_OC: if (ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) { - ctl_set_invalid_field(/*ctsio*/ ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 2, - /*bit_valid*/ 1, - /*bit*/ 2); - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); + goto invalid_options; } total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; break; case RSO_OPTIONS_OC_SA: if ((ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) == 0 || service_action >= 32) { - goto invalid; + goto invalid_options; } total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; break; case RSO_OPTIONS_OC_ASA: if ((ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) != 0 && service_action >= 32) { - goto invalid; + goto invalid_options; } total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; break; default: -invalid: +invalid_options: ctl_set_invalid_field(/*ctsio*/ ctsio, /*sks_valid*/ 1, /*command*/ 1,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202412010457.4B14vpXf097144>