diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-11-21 01:59:25 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-11-21 01:59:25 +0000 |
commit | 68dbbb7c0e8800c6b6c72bda3b1528f8e4ad6005 (patch) | |
tree | 2a3e4140910032505f16d76ef6f93e150a84a982 /sbin/fdisk/misc.h | |
parent | 6a99254c76410c0c0658d8fcbe8b03c48d865d4c (diff) |
Replace default DEV_BSIZE sector conversion factor with disklabel's
sector size when possible. Fixes the "[ XX Sectors ]" size display.
Pointed out by Robert Szasz while playing with his Sony Hi-MD device.
Apply input conversion fixes similar to those recently applied to
disklabel(8). Use correct sector size in the conversions.
It is still *not* possible to use unusual sector sizes for non-ISO9660
filesystems!
ok millert@
Diffstat (limited to 'sbin/fdisk/misc.h')
-rw-r--r-- | sbin/fdisk/misc.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/fdisk/misc.h b/sbin/fdisk/misc.h index cad3672bcf3..57f2a046445 100644 --- a/sbin/fdisk/misc.h +++ b/sbin/fdisk/misc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.h,v 1.11 2004/09/30 08:27:50 otto Exp $ */ +/* $OpenBSD: misc.h,v 1.12 2005/11/21 01:59:24 krw Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -39,7 +39,8 @@ struct unit_type { int conversion; char *lname; }; -extern const struct unit_type unit_types[]; +extern struct unit_type unit_types[]; +#define SECTORS 1 /* units are bytes/sectors/kbytes/mbytes/gbytes */ /* Constants */ #define ASK_HEX 0x01 |