From 64d3246a13e0c323164816b3820e24af7b8f003e Mon Sep 17 00:00:00 2001 From: jake Date: Mon, 2 Dec 2002 01:46:22 +0000 Subject: 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 --- sys/boot/ofw/libofw/devicename.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys') 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; } } -- cgit v1.1