summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2015-03-24 10:04:10 -0400
committerThierry Vignaud <thierry.vignaud@gmail.com>2015-03-25 19:55:33 +0100
commit7f7356af622b3762f8a4b16c28e5daee2a69b220 (patch)
treea0af40dbdb0b70914f786280faf98f9f437265d6 /perl-install
parent9d4af4f63e298ebf312765a794e39bcca5ad601b (diff)
downloaddrakx-7f7356af622b3762f8a4b16c28e5daee2a69b220.tar
drakx-7f7356af622b3762f8a4b16c28e5daee2a69b220.tar.gz
drakx-7f7356af622b3762f8a4b16c28e5daee2a69b220.tar.bz2
drakx-7f7356af622b3762f8a4b16c28e5daee2a69b220.tar.xz
drakx-7f7356af622b3762f8a4b16c28e5daee2a69b220.zip
further simplify
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/c/stuff.xs.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl
index 73597cbd7..4b7ce74c3 100755
--- a/perl-install/c/stuff.xs.pl
+++ b/perl-install/c/stuff.xs.pl
@@ -602,7 +602,10 @@ get_disk_partitions(char * device_path)
return;
part = ped_disk_next_partition(disk, NULL);
while(part) {
- if(part->num != -1) {
+ if(part->num == -1) {
+ part = ped_disk_next_partition(disk, part);
+ continue;
+ }
char desc[4196];
char *path = ped_partition_get_path(part);
sprintf(desc, "%d ", part->num);
@@ -626,9 +629,8 @@ get_disk_partitions(char * device_path)
}
sprintf(desc+strlen(desc), " (%lld,%lld,%lld)", part->geom.start, part->geom.end, part->geom.length);
XPUSHs(sv_2mortal(newSVpv(desc, 0)));
- }
part = ped_disk_next_partition(disk, part);
- }
+ }
ped_disk_destroy(disk);
}