Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sbin/gpt



Module Name:    src
Committed By:   kre
Date:           Fri Feb  6 11:14:37 UTC 2026

Modified Files:
        src/sbin/gpt: main.c

Log Message:
Allow scaling of the media size (-m arg)

Note that we cannot use gpt_size_get() as that needs gpt->secsz
to have been set already (ie: can only be used after gpt_open)
and treats unscaled numbers as multiples of sectors, whereas the
-m arg has always been a byte size.

For gpt_human_get() or simply using dehumanize_number() we
would need to handle 's' and 'b' suffixes by hand anyway, so it
is simpler to simply to the whole thing longhand in this case.

This also allows (with some hackery) for the media size to be
set as some number of sectors, when we do not yet know the
sector size - it gets corrected later once the sector size has
been determined.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sbin/gpt/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index