summaryrefslogtreecommitdiffstats
path: root/sbin/newfs/mkfs.c
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2007-05-29 06:28:14 +0000
committerotto <otto@openbsd.org>2007-05-29 06:28:14 +0000
commitddfcbf38c8ab6225a6b172d829aa957007d2587f (patch)
treec5f4d21233850402b96caaad6159a790e2ebac70 /sbin/newfs/mkfs.c
parenttweaks; help/ok cnst (diff)
downloadwireguard-openbsd-ddfcbf38c8ab6225a6b172d829aa957007d2587f.tar.xz
wireguard-openbsd-ddfcbf38c8ab6225a6b172d829aa957007d2587f.zip
Updated disklabel format to support larger disks and partitions. We
free room in struct partition by packing fragment size and fragments/block more tighlty and use the resulting space to make offset and size 48 bits. For the disk part we use spare fields in struct disklabel. Kernel converts in-mem copy of the on-disk label if needed, disklabel(8) writes new version. We are careful to only change fields not used by bootloaders. Conception of basic scheme by deraadt. ok deraadt@ krw@
Diffstat (limited to 'sbin/newfs/mkfs.c')
-rw-r--r--sbin/newfs/mkfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c
index 317260128a0..3b2cc58df5f 100644
--- a/sbin/newfs/mkfs.c
+++ b/sbin/newfs/mkfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkfs.c,v 1.63 2007/05/19 20:12:50 otto Exp $ */
+/* $OpenBSD: mkfs.c,v 1.64 2007/05/29 06:28:16 otto Exp $ */
/* $NetBSD: mkfs.c,v 1.25 1995/06/18 21:35:38 cgd Exp $ */
/*
@@ -593,8 +593,8 @@ mkfs(struct partition *pp, char *fsys, int fi, int fo, mode_t mfsmode,
* be updated on disk.
*/
pp->p_fstype = FS_BSDFFS;
- pp->p_fsize = sblock.fs_fsize;
- pp->p_frag = sblock.fs_frag;
+ pp->p_fragblock =
+ DISKLABELV1_FFS_FRAGBLOCK(sblock.fs_fsize, sblock.fs_frag);
pp->p_cpg = sblock.fs_cpg;
}