From 444b0299644e2e692c1f8d00d8b1caa0acea33a3 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Tue, 29 May 2007 06:28:17 +0000 Subject: 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@ --- sbin/growfs/growfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sbin/growfs') diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c index 1d7ec8b243a..83b6668edc9 100644 --- a/sbin/growfs/growfs.c +++ b/sbin/growfs/growfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: growfs.c,v 1.18 2007/04/23 10:18:30 pedro Exp $ */ +/* $OpenBSD: growfs.c,v 1.19 2007/05/29 06:28:16 otto Exp $ */ /* * Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz * Copyright (c) 1980, 1989, 1993 The Regents of the University of California. @@ -46,7 +46,7 @@ static const char copyright[] = Copyright (c) 1980, 1989, 1993 The Regents of the University of California.\n\ All rights reserved.\n"; -static const char rcsid[] = "$OpenBSD: growfs.c,v 1.18 2007/04/23 10:18:30 pedro Exp $"; +static const char rcsid[] = "$OpenBSD: growfs.c,v 1.19 2007/05/29 06:28:16 otto Exp $"; #endif /* not lint */ /* ********************************************************** INCLUDES ***** */ @@ -2093,8 +2093,8 @@ main(int argc, char **argv) /* * Update the disk label. */ - 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; return_disklabel(fso, lp, Nflag); -- cgit v1.2.3