summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2011-05-22 17:49:27 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2011-05-22 17:49:27 +0000
commitf9d9d435b9940b90ecd8a0a0a59785da74ec246a (patch)
tree8c58ad33f0a8c274a6ce40ffdd8831c2196d59dc
parentcc3f4b7594a3e133e78d002469d21261ace41a29 (diff)
Apply proper rounding for the R command (changing of auto-allocated
partitions); ok krw@
-rw-r--r--sbin/disklabel/editor.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c
index 8674d5f3ef6..b1a2a7358b1 100644
--- a/sbin/disklabel/editor.c
+++ b/sbin/disklabel/editor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: editor.c,v 1.253 2011/05/22 13:04:40 otto Exp $ */
+/* $OpenBSD: editor.c,v 1.254 2011/05/22 17:49:26 otto Exp $ */
/*
* Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -755,6 +755,7 @@ editor_resize(struct disklabel *lp, char *p)
}
DL_SETPSIZE(pp, secs);
+ get_bsize(&label, partno);
/*
* Pack partitions above the resized partition, leaving unused
@@ -785,6 +786,7 @@ editor_resize(struct disklabel *lp, char *p)
fputs("No room left for all partitions\n", stderr);
return;
}
+ get_bsize(&label, i);
prev = pp;
}
*lp = label;
@@ -1767,8 +1769,8 @@ editor_help(void)
" m [part] - modify partition\n"
"\n"
"Suffixes can be used to indicate units other than sectors:\n"
-"\t'b' (bytes), 'k' (kilobytes), 'm' (megabytes), 'g' (gigabytes)\n"
-"\t'c' (cylinders), '%' (% of total disk), '&' (% of free space).\n"
+" 'b' (bytes), 'k' (kilobytes), 'm' (megabytes), 'g' (gigabytes) 't' (terabytes)\n"
+" 'c' (cylinders), '%' (% of total disk), '&' (% of free space).\n"
"Values in non-sector units are truncated to the nearest cylinder boundary.");
}