disallow creation of filesystem on partition marked FS_BOOT
authorMike Hibler <hibler@ucbvax.Berkeley.EDU>
Tue, 4 May 1993 06:07:48 +0000 (22:07 -0800)
committerMike Hibler <hibler@ucbvax.Berkeley.EDU>
Tue, 4 May 1993 06:07:48 +0000 (22:07 -0800)
SCCS-vsn: sbin/newfs/newfs.c 6.33

usr/src/sbin/newfs/newfs.c

index e36c06c..0810440 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)newfs.c    6.32 (Berkeley) %G%";
+static char sccsid[] = "@(#)newfs.c    6.33 (Berkeley) %G%";
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
@@ -374,6 +374,9 @@ main(argc, argv)
                if (pp->p_size == 0)
                        fatal("%s: `%c' partition is unavailable",
                            argv[0], *cp);
                if (pp->p_size == 0)
                        fatal("%s: `%c' partition is unavailable",
                            argv[0], *cp);
+               if (pp->p_fstype == FS_BOOT)
+                       fatal("%s: `%c' partition overlaps boot program",
+                             argv[0], *cp);
        }
        if (fssize == 0)
                fssize = pp->p_size;
        }
        if (fssize == 0)
                fssize = pp->p_size;