diff options
author | Karel Zak | 2014-10-14 16:44:54 +0200 |
---|---|---|
committer | Karel Zak | 2014-10-14 16:44:54 +0200 |
commit | a389baf116834b2664288ef7934dd0fd80b1c836 (patch) | |
tree | 7822df0c7689a48f29aca4b0c78ed1286e880c78 | |
parent | libfdisk: fix script unit test (diff) | |
download | kernel-qcow2-util-linux-a389baf116834b2664288ef7934dd0fd80b1c836.tar.gz kernel-qcow2-util-linux-a389baf116834b2664288ef7934dd0fd80b1c836.tar.xz kernel-qcow2-util-linux-a389baf116834b2664288ef7934dd0fd80b1c836.zip |
libfdisk: (dos) fix N-1 error for partition size
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | libfdisk/src/dos.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c index f489fdf17..0ce032867 100644 --- a/libfdisk/src/dos.c +++ b/libfdisk/src/dos.c @@ -1127,8 +1127,7 @@ static int add_partition(struct fdisk_context *cxt, size_t n, stop = stop * fdisk_get_units_per_sector(cxt) - 1; if (stop >limit) stop = limit; - } else - stop -= 1; + } } DBG(LABEL, ul_debug("DOS: raw stop: %ju", (uintmax_t) stop)); |