From: Jim Meyering <[email protected]>
Before, it would clear a sector only if it recognized its own
signature. In addition, it would continue clearing subsequent
sectors as long as loop_probe succeeded. Now we simply clear
the first sector.
* libparted/labels/loop.c (loop_clobber): Simplify.
---
libparted/labels/loop.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/libparted/labels/loop.c b/libparted/labels/loop.c
index b08a04e..76a99af 100644
--- a/libparted/labels/loop.c
+++ b/libparted/labels/loop.c
@@ -78,13 +78,7 @@ static int
loop_clobber (PedDevice* dev)
{
PED_ASSERT (dev != NULL, return 0);
-
- PedSector i = 0;
- while (loop_probe (dev)) {
- if (!ptt_clear_sectors (dev, i++, 1))
- return 0;
- }
- return 1;
+ return ptt_clear_sectors (dev, 0, 1);
}
#endif /* !DISCOVER_ONLY */
--
1.6.6.rc0.54.gb073b
_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel