summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2018-11-25 17:12:10 +0000
committerkrw <krw@openbsd.org>2018-11-25 17:12:10 +0000
commit03d6ed1c9defdd6f33eab31d65196c9200b0c352 (patch)
tree55ccab984228dfe4ad410f1bf0b16383a8dbd185
parentFS_BOOT partitions are just partitions. Not free(ish) space. (diff)
downloadwireguard-openbsd-03d6ed1c9defdd6f33eab31d65196c9200b0c352.tar.xz
wireguard-openbsd-03d6ed1c9defdd6f33eab31d65196c9200b0c352.zip
Remove (unused) FS_BOOT training wheels. If you are allowed to newfs a
partition, you obviously know what you are doing. Even (especially?) if the new file system will be ffs or ext2fs. ok deraadt@ as part of larger diff
-rw-r--r--sbin/newfs/newfs.c5
-rw-r--r--sbin/newfs_ext2fs/newfs_ext2fs.c5
2 files changed, 2 insertions, 8 deletions
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c
index dd541a79174..349e669a295 100644
--- a/sbin/newfs/newfs.c
+++ b/sbin/newfs/newfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: newfs.c,v 1.110 2018/03/10 07:55:49 otto Exp $ */
+/* $OpenBSD: newfs.c,v 1.111 2018/11/25 17:12:10 krw Exp $ */
/* $NetBSD: newfs.c,v 1.20 1996/05/16 07:13:03 thorpej Exp $ */
/*
@@ -443,9 +443,6 @@ main(int argc, char *argv[])
if (DL_GETPSIZE(pp) == 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);
}
havelabel:
if (sectorsize == 0) {
diff --git a/sbin/newfs_ext2fs/newfs_ext2fs.c b/sbin/newfs_ext2fs/newfs_ext2fs.c
index 0e95edc679c..815e4942553 100644
--- a/sbin/newfs_ext2fs/newfs_ext2fs.c
+++ b/sbin/newfs_ext2fs/newfs_ext2fs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: newfs_ext2fs.c,v 1.25 2016/03/16 08:34:11 natano Exp $ */
+/* $OpenBSD: newfs_ext2fs.c,v 1.26 2018/11/25 17:12:10 krw Exp $ */
/* $NetBSD: newfs_ext2fs.c,v 1.8 2009/03/02 10:38:13 tsutsui Exp $ */
/*
@@ -510,9 +510,6 @@ getpartition(int fsi, const char *special, char *argv[], struct disklabel **dl)
pp = &lp->d_partitions[*cp - 'a'];
if (DL_GETPSIZE(pp) == 0)
errx(EXIT_FAILURE, "%s: `%c' partition is unavailable", argv[0], *cp);
- if (pp->p_fstype == FS_BOOT)
- errx(EXIT_FAILURE, "%s: `%c' partition overlaps boot program",
- argv[0], *cp);
*dl = lp;
return pp;
}