]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libfdisk: (dos) rewrite fist/last free sector functions
authorKarel Zak <kzak@redhat.com>
Mon, 25 Feb 2019 12:59:50 +0000 (13:59 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 25 Feb 2019 12:59:50 +0000 (13:59 +0100)
commitadea904a61a93557e08809249fcac38e9da5cebd
tree83d3a020456a1ea532310e063bba223870eff5f0
parent911e694528618b52ce23e4e29a7a85ee9f4edf05
libfdisk: (dos) rewrite fist/last free sector functions

The current code uses first[] and last[] arrays to specify partition
ranges. This is unnecessary as we already have all in memory.

The current code offers in first and last sector dialogs ranges
without care about already used areas.

This commit makes things more readable, more user-friendly and
remove obscure first[] and last[].

Reported-by: 冰柯 <ziming_cool@126.com
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/dos.c