From e8cdabb4e135852b1342f5622beb56e8a04914c1 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 19 Jun 2023 14:43:37 -0600 Subject: [PATCH] camcontrol: In defects make -S actually imply 12-byte command camcontrol(8) says that -S to start at a different offset implies that we're using the 12 byte command. But really, we're using the 10-byte command. Fix this by setting use_12byte for -S. Sponsored by: Netflix Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D40526 --- sbin/camcontrol/camcontrol.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index 45b769589da..4856122a0c0 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -3895,6 +3895,7 @@ readdefects(struct cam_device *device, int argc, char **argv, warnx("invalid starting offset %s", optarg); goto defect_bailout; } + use_12byte = true; break; } case 'X':