summaryrefslogtreecommitdiff
path: root/sbin/disklabel
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-12-23 16:15:22 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-12-23 16:15:22 +0000
commitfb27cdf6dee7a4a17a4bf6921388d3112ed189af (patch)
treebe2bcd80022399b70990c25fc1de4a8755a1d2f4 /sbin/disklabel
parent345136d9744229f12d83667c5dfbec695a1697ee (diff)
Setting p_fstype to the number of free sectors can't be right. Instead, set
the partition size with DL_SETPSIZE(pp, *freep).
Diffstat (limited to 'sbin/disklabel')
-rw-r--r--sbin/disklabel/editor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c
index 96881391201..329f1ce757a 100644
--- a/sbin/disklabel/editor.c
+++ b/sbin/disklabel/editor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: editor.c,v 1.125 2007/09/02 15:19:23 deraadt Exp $ */
+/* $OpenBSD: editor.c,v 1.126 2007/12/23 16:15:21 krw Exp $ */
/*
* Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -17,7 +17,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: editor.c,v 1.125 2007/09/02 15:19:23 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: editor.c,v 1.126 2007/12/23 16:15:21 krw Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -673,7 +673,7 @@ editor_modify(struct disklabel *lp, char **mp, u_int64_t *freep, char *p)
"Warning, need %llu sectors but there are only %llu "
"free. Setting size to %llu.\n", DL_GETPSIZE(pp), *freep,
*freep);
- pp->p_fstype = *freep;
+ DL_SETPSIZE(pp, *freep);
*freep = 0;
} else
*freep -= DL_GETPSIZE(pp); /* have enough space */