fdisk: sync up with some util-linux 2.31 behavior

= display default is no longer in cylinders
= +sizeC is no longer supported
= add +sizeT suffix - terabytes are here
= K,M,G,T and k,m,g,t suffixes all are binary, not decimal
= +sizeM results in last sector +(size * 1Mbyte - 1), not +(size * 1Mbyte)
= fix comparison to "YES" answer for sgi/sun

function                                             old     new   delta
read_int                                             492     519     +27
fdisk_main                                          2644    2640      -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 27/-4)              Total: 23 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2018-07-25 13:45:36 +02:00
parent 163e637ffb
commit c104549b48
3 changed files with 46 additions and 48 deletions

View File

@@ -623,7 +623,7 @@ sgi_change_sysid(int i, int sys)
"retrieve from its directory standalone tools like sash and fx.\n"
"Only the \"SGI volume\" entire disk section may violate this.\n"
"Type YES if you are sure about tagging this partition differently.\n");
if (strcmp(line_ptr, "YES\n") != 0)
if (strcmp(line_ptr, "YES") != 0)
return;
}
sgilabel->partitions[i].id = SGI_SSWAP32(sys);