diff options
author | Karel Zak | 2017-02-17 13:15:09 +0100 |
---|---|---|
committer | Karel Zak | 2017-02-17 13:17:48 +0100 |
commit | e1cfb3046608f9c4543d5e3e3d405c39995a1f86 (patch) | |
tree | c7fff99da40e3e4c21a1273c883b014610bc0140 /libfdisk/src/dos.c | |
parent | tests: (sfdisk) tell kernel about new partition (diff) | |
download | kernel-qcow2-util-linux-e1cfb3046608f9c4543d5e3e3d405c39995a1f86.tar.gz kernel-qcow2-util-linux-e1cfb3046608f9c4543d5e3e3d405c39995a1f86.tar.xz kernel-qcow2-util-linux-e1cfb3046608f9c4543d5e3e3d405c39995a1f86.zip |
libfdisk: verify partno from template
* verify partno from template when create a new partition
* remove unnecessary l->ext_offset check
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, 1 insertions, 1 deletions
diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c index c7c7772e8..0c2006ed6 100644 --- a/libfdisk/src/dos.c +++ b/libfdisk/src/dos.c @@ -1548,7 +1548,7 @@ static int dos_add_partition(struct fdisk_context *cxt, } /* pa specifies start, but outside extended partition */ - } else if (pa && fdisk_partition_has_start(pa) && l->ext_offset) { + } else if (pa && fdisk_partition_has_start(pa)) { DBG(LABEL, ul_debug("DOS: pa template %p: add primary", pa)); rc = get_partition_unused_primary(cxt, pa, &res); if (rc == 0) { |