diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2009-06-02 16:23:46 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2009-06-02 16:23:46 +0000 |
commit | b294de3389ef86f3261202c035f47a77b9e18435 (patch) | |
tree | f6d01089269d31ea876b4aa6863711351bfadbac /sbin/disklabel/extern.h | |
parent | da5b5ff410d49e53c9352edc0f04e3f54516fa23 (diff) |
Add '-h' flag, and '*' as a unit specifier for 'p' Editor command.
Both cause partition sizes to be displayed using a human readable
format with the units automatically chosen by looking at the smallest
partition in the disk label. Remove forceable humanization in 'A'
code and use '-h' in install scripts.
Prodded & ok deraadt@, verbiage tweaks from jmc@
Diffstat (limited to 'sbin/disklabel/extern.h')
-rw-r--r-- | sbin/disklabel/extern.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/disklabel/extern.h b/sbin/disklabel/extern.h index 356e15bcd5c..ea86a4c0a39 100644 --- a/sbin/disklabel/extern.h +++ b/sbin/disklabel/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.15 2009/04/18 00:15:46 sthen Exp $ */ +/* $OpenBSD: extern.h,v 1.16 2009/06/02 16:23:45 krw Exp $ */ /* * Copyright (c) 2003 Theo de Raadt <deraadt@openbsd.org> @@ -16,8 +16,12 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#define MEG(x) ((x) * 1024LL * (1024 / 512)) +#define GIG(x) (MEG(x) * 1024LL) + u_short dkcksum(struct disklabel *); int checklabel(struct disklabel *); +char canonical_unit(struct disklabel *, char); double scale(u_int64_t, char, struct disklabel *); void display(FILE *, struct disklabel *, char, int); void display_partition(FILE *, struct disklabel *, int, char); |