get to 4.3!
[unix-history] / usr / src / usr.sbin / mkproto / mkproto.c
index 52e65f2..378a4be 100644 (file)
@@ -1,6 +1,18 @@
-/* Copyright (c) 1982 Regents of the University of California */
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
+#ifndef lint
+char copyright[] =
+"@(#) Copyright (c) 1980 Regents of the University of California.\n\
+ All rights reserved.\n";
+#endif not lint
 
 
-static char sccsid[] = "@(#)mkproto.c  4.1     (Berkeley)      %G%";
+#ifndef lint
+static char sccsid[] = "@(#)mkproto.c  5.1 (Berkeley) %G%";
+#endif not lint
 
 /*
  * Make a file system prototype.
 
 /*
  * Make a file system prototype.
@@ -141,7 +153,7 @@ descend(par)
 
                i = getnum() & 0377;
                f = getnum() & 0377;
 
                i = getnum() & 0377;
                f = getnum() & 0377;
-               in.i_dev = (i << 8) | f;
+               in.i_rdev = (i << 8) | f;
                break;
 
        case IFDIR:
                break;
 
        case IFDIR:
@@ -245,7 +257,7 @@ entry(ip, inum, str, buf)
        char *buf;
 {
        register struct direct *dp, *odp;
        char *buf;
 {
        register struct direct *dp, *odp;
-       int oldsize, newsize, freespace;
+       int oldsize, newsize, spacefree;
 
        odp = dp = (struct direct *)buf;
        while ((int)dp - (int)buf < ip->i_size) {
 
        odp = dp = (struct direct *)buf;
        while ((int)dp - (int)buf < ip->i_size) {
@@ -256,14 +268,14 @@ entry(ip, inum, str, buf)
                oldsize = DIRSIZ(odp);
        else
                oldsize = 0;
                oldsize = DIRSIZ(odp);
        else
                oldsize = 0;
-       freespace = odp->d_reclen - oldsize;
+       spacefree = odp->d_reclen - oldsize;
        dp = (struct direct *)((int)odp + oldsize);
        dp->d_ino = inum;
        dp->d_namlen = strlen(str);
        newsize = DIRSIZ(dp);
        dp = (struct direct *)((int)odp + oldsize);
        dp->d_ino = inum;
        dp->d_namlen = strlen(str);
        newsize = DIRSIZ(dp);
-       if (freespace >= newsize) {
+       if (spacefree >= newsize) {
                odp->d_reclen = oldsize;
                odp->d_reclen = oldsize;
-               dp->d_reclen = freespace;
+               dp->d_reclen = spacefree;
        } else {
                dp = (struct direct *)((int)odp + odp->d_reclen);
                if ((int)dp - (int)buf >= fs->fs_bsize) {
        } else {
                dp = (struct direct *)((int)odp + odp->d_reclen);
                if ((int)dp - (int)buf >= fs->fs_bsize) {