bin/174072: [patch] mptutil: capture cam related errors
Garrett Cooper
yanegomi at gmail.com
Mon Dec 3 04:30:00 UTC 2012
>Number: 174072
>Category: bin
>Synopsis: [patch] mptutil: capture cam related errors
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Dec 03 04:30:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Garrett Cooper
>Release: n/a
>Organization:
EMC Isilon
>Environment:
n/a
>Description:
The attached patch catches cam-related errors when using mptutil.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
Index: usr.sbin/mptutil/mpt_config.c
===================================================================
--- usr.sbin/mptutil/mpt_config.c (revision 243802)
+++ usr.sbin/mptutil/mpt_config.c (working copy)
@@ -305,10 +305,10 @@
}
printf("mpt%d: Configuration cleared\n", mpt_unit);
- mpt_rescan_bus(-1, -1);
+ error = mpt_rescan_bus(-1, -1);
close(fd);
- return (0);
+ return (error);
}
MPT_COMMAND(top, clear, clear_config);
@@ -742,7 +742,7 @@
#ifdef DEBUG
skip:
#endif
- mpt_rescan_bus(vol->VolumeBus, vol->VolumeID);
+ error = mpt_rescan_bus(vol->VolumeBus, vol->VolumeID);
/* Clean up. */
free(vol);
@@ -752,7 +752,7 @@
free(state.ioc2);
close(fd);
- return (0);
+ return (error);
}
MPT_COMMAND(top, create, create_volume);
@@ -792,10 +792,10 @@
return (error);
}
- mpt_rescan_bus(-1, -1);
+ error = mpt_rescan_bus(-1, -1);
close(fd);
- return (0);
+ return (error);
}
MPT_COMMAND(top, delete, delete_volume);
@@ -1015,7 +1015,9 @@
return (error);
}
- mpt_rescan_bus(info->PhysDiskBus, info->PhysDiskID);
+ error = mpt_rescan_bus(info->PhysDiskBus, info->PhysDiskID);
+ if (error)
+ return (error);
free(info);
close(fd);
@@ -1119,7 +1121,9 @@
return (error);
}
- mpt_rescan_bus(info->PhysDiskBus, info->PhysDiskID);
+ error = mpt_rescan_bus(info->PhysDiskBus, info->PhysDiskID);
+ if (error)
+ return (error);
free(info);
close(fd);
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list