diff options
| author | Peter Wemm <peter@FreeBSD.org> | 2000-10-15 10:17:55 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 2000-10-15 10:17:55 +0000 |
| commit | 642f0c46bf91551aa00537d63e4f26f75be06d42 (patch) | |
| tree | 1e0570abfddbb433ff5e39ce3e584abdeeaca46d /sys | |
| parent | 398bc678aa72900b9df14eb3112ecc277d15eb09 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/cam/cam_xpt.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index bf23cbc60742..33d02aa41320 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -4164,19 +4164,19 @@ xptpathid(const char *sim_name, int sim_unit, int sim_bus) { path_id_t pathid; int i, dunit, val; - char buf[32], *strval; + char buf[32]; pathid = CAM_XPT_PATH_ID; snprintf(buf, sizeof(buf), "%s%d", sim_name, sim_unit); i = -1; - while ((i = resource_locate(i, "scbus")) != -1) { + while ((i = resource_query_string(i, "at", buf)) != -1) { + if (strcmp(resource_query_name(i), "scbus")) { + /* Avoid a bit of foot shooting. */ + continue; + } dunit = resource_query_unit(i); if (dunit < 0) /* unwired?! */ continue; - if (resource_string_value("scbus", dunit, "at", &strval) != 0) - continue; - if (strcmp(buf, strval) != 0) - continue; if (resource_int_value("scbus", dunit, "bus", &val) == 0) { if (sim_bus == val) { pathid = dunit; |
