summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xperl-install/c/stuff.xs.pl7
1 files changed, 3 insertions, 4 deletions
diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl
index f54a8689b..c8dc6130c 100755
--- a/perl-install/c/stuff.xs.pl
+++ b/perl-install/c/stuff.xs.pl
@@ -641,10 +641,9 @@ get_disk_type(char * device_path)
PedDevice *dev = ped_device_get(device_path);
RETVAL = NULL;
if(dev) {
- PedDisk* disk = ped_disk_new(dev);
- if(disk) {
- RETVAL = disk->type->name;
- ped_disk_destroy(disk);
+ PedDiskType* type = ped_disk_probe(dev);
+ if(type) {
+ RETVAL = type->name;
}
}
OUTPUT: