mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
Treat input units of both 's' and 'S' as 512-byte sectors. (2.02.49)
's' and 'S' are special suffixes representing sectors and are always 512 bytes, regardless of whether you're using powers of 1000 or 1024.
This commit is contained in:
parent
95eaa68309
commit
673ecf73cf
@ -1,5 +1,6 @@
|
||||
Version 2.02.54 -
|
||||
=====================================
|
||||
Treat input units of both 's' and 'S' as 512-byte sectors. (2.02.49)
|
||||
Use standard output units for 'PE Size' and 'Stripe size' in pv/lvdisplay.
|
||||
Add configure --enable-units-compat to set si_unit_consistency off by default.
|
||||
Add global/si_unit_consistency to enable cleaned-up use of units in output.
|
||||
|
@ -68,6 +68,7 @@ uint64_t units_to_bytes(const char *units, char *unit_type)
|
||||
break;
|
||||
#define KILO UINT64_C(1024)
|
||||
case 's':
|
||||
case 'S':
|
||||
v *= (KILO/2);
|
||||
break;
|
||||
case 'k':
|
||||
@ -90,9 +91,6 @@ uint64_t units_to_bytes(const char *units, char *unit_type)
|
||||
break;
|
||||
#undef KILO
|
||||
#define KILO UINT64_C(1000)
|
||||
case 'S':
|
||||
v *= (KILO/2);
|
||||
break;
|
||||
case 'K':
|
||||
v *= KILO;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user