must flush stderr before reading from the terminal
[unix-history] / usr / src / sbin / restore / symtab.c
index 0e5aea6..7e19c68 100644 (file)
@@ -1,7 +1,7 @@
 /* Copyright (c) 1983 Regents of the University of California */
 
 #ifndef lint
 /* Copyright (c) 1983 Regents of the University of California */
 
 #ifndef lint
-static char sccsid[] = "@(#)symtab.c   3.8     (Berkeley)      83/03/27";
+static char sccsid[] = "@(#)symtab.c   3.10    (Berkeley)      83/05/03";
 #endif
 
 /*
 #endif
 
 /*
@@ -205,6 +205,7 @@ addentry(name, inum, type)
                ep = lookupino(inum);
                if (ep == NIL)
                        panic("link to non-existant name\n");
                ep = lookupino(inum);
                if (ep == NIL)
                        panic("link to non-existant name\n");
+               np->e_ino = inum;
                np->e_links = ep->e_links;
                ep->e_links = np;
        } else if (inum != 0) {
                np->e_links = ep->e_links;
                ep->e_links = np;
        } else if (inum != 0) {
@@ -490,7 +491,8 @@ initsymtable(filename)
                        calloc((unsigned)entrytblsize, sizeof(struct entry *));
                if (entry == (struct entry **)NIL)
                        panic("no memory for entry table\n");
                        calloc((unsigned)entrytblsize, sizeof(struct entry *));
                if (entry == (struct entry **)NIL)
                        panic("no memory for entry table\n");
-               (void)addentry(".", ROOTINO, NODE);
+               ep = addentry(".", ROOTINO, NODE);
+               ep->e_flags |= NEW;
                return;
        }
        if ((fd = open(filename, 0)) < 0) {
                return;
        }
        if ((fd = open(filename, 0)) < 0) {