summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2002-12-02 01:46:22 +0000
committerjake <jake@FreeBSD.org>2002-12-02 01:46:22 +0000
commit64d3246a13e0c323164816b3820e24af7b8f003e (patch)
tree9a0ea53f39686510dc9f16c1f22a974b182986f1 /sys/boot
parent4abeaed33de9450b5e4900151806d6b8329b4958 (diff)
downloadFreeBSD-src-64d3246a13e0c323164816b3820e24af7b8f003e.zip
FreeBSD-src-64d3246a13e0c323164816b3820e24af7b8f003e.tar.gz
Fix a dumb bug that broke net booting on sparc64. The wrong length was
passed to strncmp. Noticed by: tmm Approved by: re Pointy hat to: jake
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/ofw/libofw/devicename.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/boot/ofw/libofw/devicename.c b/sys/boot/ofw/libofw/devicename.c
index c2c5f36..3cb93e5 100644
--- a/sys/boot/ofw/libofw/devicename.c
+++ b/sys/boot/ofw/libofw/devicename.c
@@ -91,7 +91,7 @@ ofw_parsedev(struct ofw_devdesc **dev, const char *devspec, const char **path)
if (OF_getprop(handle, "device_type", type, sizeof(type)) == -1)
continue;
for (i = 0; (dv = devsw[i]) != NULL; i++) {
- if (strncmp(dv->dv_name, type, strlen(type)) == 0)
+ if (strncmp(dv->dv_name, type, strlen(dv->dv_name)) == 0)
goto found;
}
}
OpenPOWER on IntegriCloud