kpartx: don't keep creating recursive partitions
authorBenjamin Marzinski <bmarzins@redhat.com>
Wed, 15 Feb 2017 02:16:51 +0000 (20:16 -0600)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Mon, 27 Feb 2017 06:02:54 +0000 (07:02 +0100)
commit7c2e4988650936f68731654d3ea5cddad2a01f55
treeef9291e9508fac38fb7cdcdc5451bc61068e3501
parent4335abb36f33f12eadc943729901fac31f3dc012
kpartx: don't keep creating recursive partitions

If the dos partition table is corrupted, kpartx can just keep creating
the same partitions until it runs out of partition numbers. This check
catches the recursion.

Signed-off-by: Cedric Buissart <cbuissar@redhat.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
kpartx/dos.c