diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-05-29 06:28:17 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-05-29 06:28:17 +0000 |
commit | 444b0299644e2e692c1f8d00d8b1caa0acea33a3 (patch) | |
tree | 1b53b5865bcc8b3675238c2ebdd9daf6797ccd39 /sbin/growfs/growfs.c | |
parent | 3f6176ec485942a0e5cfcc7e61ca01950df6452c (diff) |
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/growfs/growfs.c')
-rw-r--r-- | sbin/growfs/growfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
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); |