From 8a8e67f3085797c25814b2dd07b9cf14eb2e03f8 Mon Sep 17 00:00:00 2001 From: "Kenneth D. Merry" Date: Wed, 5 Dec 2001 03:41:40 +0000 Subject: [PATCH] Fix breakage in 'camcontrol defects' introduced in rev 1.34 (the new error recovery code) back in March, 2001. In effect, this brain-o would cause 'camcontrol defects' to always return an error. Pointed out by: joerg Tested by: mdodd --- sbin/camcontrol/camcontrol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index c82ef8bfedda..6fb034fd0ac0 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 1998, 1999, 2000 Kenneth D. Merry + * Copyright (c) 1997, 1998, 1999, 2000, 2001 Kenneth D. Merry * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1291,7 +1291,7 @@ readdefects(struct cam_device *device, int argc, char **argv, CAM_EPF_ALL, stderr); goto defect_bailout; } - } else { + } else if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { error = 1; warnx("Error returned from read defect data command"); if (arglist & CAM_ARG_VERBOSE)