diff options
author | rstone <rstone@FreeBSD.org> | 2010-11-19 03:47:10 +0000 |
---|---|---|
committer | rstone <rstone@FreeBSD.org> | 2010-11-19 03:47:10 +0000 |
commit | 3c74492c3bd37cd44b46d6d14605c57fba3254fe (patch) | |
tree | cd2d3ac4bc858d93243ddcb1cd2b9cfa62ad2274 /sbin | |
parent | 562d278523a62b2568bd70c090839f79db28f06c (diff) | |
download | FreeBSD-src-3c74492c3bd37cd44b46d6d14605c57fba3254fe.zip FreeBSD-src-3c74492c3bd37cd44b46d6d14605c57fba3254fe.tar.gz |
When doing a camcontrol rescan all or a camcontrol reset all, use the wildcard
path id for enumerating the available busses. Previously camcontrol was
implicitly passing 0 as the first path id, which meant that if bus 0 was not
present camcontrol would fail with EINVAL instead of rescanning/resetting any
busses that were present.
Approved by: emaste (mentor)
MFC after: 1 week
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/camcontrol/camcontrol.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index 25f8777..2379a8e 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -1526,6 +1526,7 @@ rescan_or_reset_bus(int bus, int rescan) bzero(&(&matchccb.ccb_h)[1], sizeof(struct ccb_dev_match) - sizeof(struct ccb_hdr)); matchccb.ccb_h.func_code = XPT_DEV_MATCH; + matchccb.ccb_h.path_id = CAM_BUS_WILDCARD; bufsize = sizeof(struct dev_match_result) * 20; matchccb.cdm.match_buf_len = bufsize; matchccb.cdm.matches=(struct dev_match_result *)malloc(bufsize); |