summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ffs/setup.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/fsck_ffs/setup.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/fsck_ffs/setup.c')
-rw-r--r--sbin/fsck_ffs/setup.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/fsck_ffs/setup.c b/sbin/fsck_ffs/setup.c
index ada879b2f3b..3c007e05a5a 100644
--- a/sbin/fsck_ffs/setup.c
+++ b/sbin/fsck_ffs/setup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: setup.c,v 1.34 2007/04/18 20:49:46 otto Exp $ */
+/* $OpenBSD: setup.c,v 1.35 2007/05/29 06:28:15 otto Exp $ */
/* $NetBSD: setup.c,v 1.27 1996/09/27 22:45:19 christos Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)setup.c 8.5 (Berkeley) 11/23/94";
#else
-static const char rcsid[] = "$OpenBSD: setup.c,v 1.34 2007/04/18 20:49:46 otto Exp $";
+static const char rcsid[] = "$OpenBSD: setup.c,v 1.35 2007/05/29 06:28:15 otto Exp $";
#endif
#endif /* not lint */
@@ -638,8 +638,8 @@ calcsb(char *dev, int devfd, struct fs *fs)
return (0);
}
memset(fs, 0, sizeof(struct fs));
- fs->fs_fsize = pp->p_fsize;
- fs->fs_frag = pp->p_frag;
+ fs->fs_fsize = DISKLABELV1_FFS_FSIZE(pp->p_fragblock);
+ fs->fs_frag = DISKLABELV1_FFS_FRAG(pp->p_fragblock);
fs->fs_bsize = fs->fs_fsize * fs->fs_frag;
fs->fs_cpg = pp->p_cpg;
fs->fs_nspf = fs->fs_fsize / lp->d_secsize;