break UFS up into FFS/UFS/LFS/MFS
[unix-history] / usr / src / usr.sbin / config / mkheaders.c
index 4820e4d..70fd5d8 100644 (file)
@@ -2,16 +2,11 @@
  * Copyright (c) 1980 Regents of the University of California.
  * All rights reserved.
  *
  * Copyright (c) 1980 Regents of the University of California.
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of California at Berkeley. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
+ * %sccs.include.redist.c%
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)mkheaders.c        5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)mkheaders.c        5.7 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -60,8 +55,8 @@ do_count(dev, hname, search)
                                count = dp->d_unit + 1;
                        if (search) {
                                mp = dp->d_conn;
                                count = dp->d_unit + 1;
                        if (search) {
                                mp = dp->d_conn;
-                               if (mp != 0 && mp != (struct device *)-1 &&
-                                   mp->d_conn != (struct device *)-1) {
+                               if (mp != 0 && mp != TO_NEXUS &&
+                                   mp->d_conn != 0 && mp->d_conn != TO_NEXUS) {
                                        do_count(mp->d_name, hname, 0);
                                        search = 0;
                                }
                                        do_count(mp->d_name, hname, 0);
                                        search = 0;
                                }
@@ -113,6 +108,7 @@ do_header(dev, hname, count)
                if (cp == (char *)EOF)
                        break;
                fl = (struct file_list *) malloc(sizeof *fl);
                if (cp == (char *)EOF)
                        break;
                fl = (struct file_list *) malloc(sizeof *fl);
+               bzero(fl, sizeof(*fl));
                fl->f_fn = inw;
                fl->f_type = inc;
                fl->f_next = fl_head;
                fl->f_fn = inw;
                fl->f_type = inc;
                fl->f_next = fl_head;
@@ -126,6 +122,7 @@ do_header(dev, hname, count)
        }
        if (oldcount == -1) {
                fl = (struct file_list *) malloc(sizeof *fl);
        }
        if (oldcount == -1) {
                fl = (struct file_list *) malloc(sizeof *fl);
+               bzero(fl, sizeof(*fl));
                fl->f_fn = name;
                fl->f_type = count;
                fl->f_next = fl_head;
                fl->f_fn = name;
                fl->f_type = count;
                fl->f_next = fl_head;