summaryrefslogtreecommitdiff
path: root/usr.sbin/ndiscvt/inf.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ndiscvt/inf.c')
-rw-r--r--usr.sbin/ndiscvt/inf.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/usr.sbin/ndiscvt/inf.c b/usr.sbin/ndiscvt/inf.c
index eb1015083dbb..442e7f61b1fd 100644
--- a/usr.sbin/ndiscvt/inf.c
+++ b/usr.sbin/ndiscvt/inf.c
@@ -62,9 +62,9 @@ static struct assign
(struct assign *);
static struct section
*find_section (const char *);
-static void dump_deviceids_pci (void);
-static void dump_deviceids_pcmcia (void);
-static void dump_deviceids_usb (void);
+static int dump_deviceids_pci (void);
+static int dump_deviceids_pcmcia (void);
+static int dump_deviceids_usb (void);
static void dump_pci_id (const char *);
static void dump_pcmcia_id (const char *);
static void dump_usb_id (const char *);
@@ -85,9 +85,11 @@ inf_parse (FILE *fp, FILE *outfp)
yyin = fp;
yyparse();
- dump_deviceids_pci();
- dump_deviceids_pcmcia();
- dump_deviceids_usb();
+ if (dump_deviceids_pci() == 0 &&
+ dump_deviceids_pcmcia() == 0 &&
+ dump_deviceids_usb() == 0)
+ return (-1);
+
fprintf(outfp, "#ifdef NDIS_REGVALS\n");
dump_regvals();
fprintf(outfp, "#endif /* NDIS_REGVALS */\n");
@@ -280,7 +282,7 @@ dump_usb_id(const char *s)
fprintf(ofp, "\t\\\n\t{ %s, %s, ", vidstr, pidstr);
}
-static void
+static int
dump_deviceids_pci()
{
struct assign *manf, *dev;
@@ -370,10 +372,10 @@ done:
fprintf(ofp, "\n\n");
- return;
+ return (found);
}
-static void
+static int
dump_deviceids_pcmcia()
{
struct assign *manf, *dev;
@@ -463,10 +465,10 @@ done:
fprintf(ofp, "\n\n");
- return;
+ return (found);
}
-static void
+static int
dump_deviceids_usb()
{
struct assign *manf, *dev;
@@ -556,7 +558,7 @@ done:
fprintf(ofp, "\n\n");
- return;
+ return (found);
}
static void