SCCS-vsn: sbin/fsck/dir.c 5.23
SCCS-vsn: sbin/fsck/pass2.c 5.21
-static char sccsid[] = "@(#)dir.c 5.22 (Berkeley) %G%";
+static char sccsid[] = "@(#)dir.c 5.23 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
dirp->d_ino = idesc->id_parent; /* ino to be entered is in id_parent */
if (newinofmt)
dirp->d_type = typemap[idesc->id_parent];
dirp->d_ino = idesc->id_parent; /* ino to be entered is in id_parent */
if (newinofmt)
dirp->d_type = typemap[idesc->id_parent];
+ else
+ dirp->d_type = 0;
dirp->d_reclen = newent.d_reclen;
dirp->d_namlen = newent.d_namlen;
bcopy(idesc->id_name, dirp->d_name, (size_t)dirp->d_namlen + 1);
dirp->d_reclen = newent.d_reclen;
dirp->d_namlen = newent.d_namlen;
bcopy(idesc->id_name, dirp->d_name, (size_t)dirp->d_namlen + 1);
dirp->d_ino = idesc->id_parent;
if (newinofmt)
dirp->d_type = typemap[idesc->id_parent];
dirp->d_ino = idesc->id_parent;
if (newinofmt)
dirp->d_type = typemap[idesc->id_parent];
+ else
+ dirp->d_type = 0;
-static char sccsid[] = "@(#)pass2.c 5.20 (Berkeley) %G%";
+static char sccsid[] = "@(#)pass2.c 5.21 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
proto.d_ino = idesc->id_number;
if (newinofmt)
proto.d_type = DT_DIR;
proto.d_ino = idesc->id_number;
if (newinofmt)
proto.d_type = DT_DIR;
+ else
+ proto.d_type = 0;
proto.d_namlen = 1;
(void)strcpy(proto.d_name, ".");
entrysize = DIRSIZ(0, &proto);
proto.d_namlen = 1;
(void)strcpy(proto.d_name, ".");
entrysize = DIRSIZ(0, &proto);
proto.d_ino = inp->i_parent;
if (newinofmt)
proto.d_type = DT_DIR;
proto.d_ino = inp->i_parent;
if (newinofmt)
proto.d_type = DT_DIR;
+ else
+ proto.d_type = 0;
proto.d_namlen = 2;
(void)strcpy(proto.d_name, "..");
entrysize = DIRSIZ(0, &proto);
proto.d_namlen = 2;
(void)strcpy(proto.d_name, "..");
entrysize = DIRSIZ(0, &proto);