]>
glassweightruler.freedombox.rocks Git - Ventoy.git/blob - LiveCD/VTOY/ventoy/disksize.c
5 typedef unsigned long long UINT64
;
7 int GetHumanReadableGBSize(UINT64 SizeBytes
)
12 double GB
= SizeBytes
* 1.0 / 1000 / 1000 / 1000;
14 for (i
= 0; i
< 12; i
++)
18 Delta
= (Pow2
- GB
) / Pow2
;
22 Delta
= (GB
- Pow2
) / Pow2
;
36 int main(int argc
, char **argv
)
38 UINT64 value
= strtoul(argv
[1], NULL
, 10);
40 printf("%d", GetHumanReadableGBSize(value
* 512));