diff options
author | Karel Zak | 2015-06-08 16:45:15 +0200 |
---|---|---|
committer | Karel Zak | 2015-06-08 16:45:15 +0200 |
commit | 09a4ca5e450c5e7cbe860453b76fd68c60fe591f (patch) | |
tree | 3a153b006fde6a375b27605be482ad6973dc3ef4 /libfdisk/src/dos.c | |
parent | libfdisk: (gpt) make it possible to create really small partitions (diff) | |
download | kernel-qcow2-util-linux-09a4ca5e450c5e7cbe860453b76fd68c60fe591f.tar.gz kernel-qcow2-util-linux-09a4ca5e450c5e7cbe860453b76fd68c60fe591f.tar.xz kernel-qcow2-util-linux-09a4ca5e450c5e7cbe860453b76fd68c60fe591f.zip |
libfdisk: (dos) fix tiny partitions calculation
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk/src/dos.c')
-rw-r--r-- | libfdisk/src/dos.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c index e5f708132..53c7484bf 100644 --- a/libfdisk/src/dos.c +++ b/libfdisk/src/dos.c @@ -1204,6 +1204,8 @@ static int add_partition(struct fdisk_context *cxt, size_t n, /* Don't try to be smart on very small partitions and don't * align so small sizes, just follow the resurst */ isrel = 0; + if (stop > start) + stop -= 1; DBG(LABEL, ul_debug("DOS: don't align end os tiny partition [start=%ju, stop=%ju, grain=%lu]", start, stop, cxt->grain)); } |