summaryrefslogtreecommitdiff
path: root/usr.sbin/ndiscvt
diff options
context:
space:
mode:
authorBill Paul <wpaul@FreeBSD.org>2004-01-02 21:13:21 +0000
committerBill Paul <wpaul@FreeBSD.org>2004-01-02 21:13:21 +0000
commitade996adb6a25e94d80f3d6ff4569e02dab8e6ec (patch)
tree3690b3c8151507beba1fb2de9d39b8d8a4c1f487 /usr.sbin/ndiscvt
parentd0058957b50498fc1a9f7cb200087eb9ed96da8d (diff)
downloadsrc-test2-ade996adb6a25e94d80f3d6ff4569e02dab8e6ec.tar.gz
src-test2-ade996adb6a25e94d80f3d6ff4569e02dab8e6ec.zip
Notes
Diffstat (limited to 'usr.sbin/ndiscvt')
-rw-r--r--usr.sbin/ndiscvt/inf.c10
-rw-r--r--usr.sbin/ndiscvt/ndiscvt.c2
2 files changed, 10 insertions, 2 deletions
diff --git a/usr.sbin/ndiscvt/inf.c b/usr.sbin/ndiscvt/inf.c
index 115d6265f85f..d38b17b52917 100644
--- a/usr.sbin/ndiscvt/inf.c
+++ b/usr.sbin/ndiscvt/inf.c
@@ -398,7 +398,12 @@ dump_regvals(void)
struct section *sec;
struct assign *assign;
char sname[256];
- int i, is_winxp = 0, devidx = 0;
+ int i, is_winxp = 0, is_winnt = 0, devidx = 0;
+
+ /* Find signature to check for special case of WinNT. */
+ assign = find_assign("version", "signature");
+ if (strcasecmp(assign->vals[0], "$windows nt$") == 0)
+ is_winnt++;
/* Find manufacturer name */
manf = find_assign("Manufacturer", NULL);
@@ -434,6 +439,9 @@ dump_regvals(void)
} else {
sprintf(sname, "%s.NT", assign->vals[0]);
dev = find_assign(sname, "AddReg");
+ if (dev == NULL && is_winnt)
+ dev = find_assign(assign->vals[0],
+ "AddReg");
}
/* Section not found. */
if (dev == NULL)
diff --git a/usr.sbin/ndiscvt/ndiscvt.c b/usr.sbin/ndiscvt/ndiscvt.c
index 1fde290d4eaf..edd4904b6168 100644
--- a/usr.sbin/ndiscvt/ndiscvt.c
+++ b/usr.sbin/ndiscvt/ndiscvt.c
@@ -232,7 +232,7 @@ main(int argc, char *argv[])
err(1, "selected device name '%s' is "
"too long (max chars: %d)", dname, IFNAMSIZ);
fprintf (outfp, "#define NDIS_DEVNAME \"%s\"\n", dname);
- fprintf (outfp, "#define NDIS_MODNAME %s\n", dname);
+ fprintf (outfp, "#define NDIS_MODNAME %s\n\n", dname);
}
if (inffile == NULL) {