summaryrefslogtreecommitdiffstats
path: root/perl-install/c/stuff.xs.pl
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/c/stuff.xs.pl')
-rwxr-xr-xperl-install/c/stuff.xs.pl16
1 files changed, 16 insertions, 0 deletions
diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl
index 245746821..e6bcfa0db 100755
--- a/perl-install/c/stuff.xs.pl
+++ b/perl-install/c/stuff.xs.pl
@@ -720,6 +720,22 @@ disk_add_partition(char * device_path, double start, double length, const char *
OUTPUT:
RETVAL
+int
+tell_kernel_to_reread_partition_table(char * device_path)
+ CODE:
+ PedDevice *dev = ped_device_get(device_path);
+ RETVAL=0;
+ if(dev) {
+ PedDisk* disk = ped_disk_new(dev);
+ if (disk) {
+ if (ped_disk_commit_to_os (disk))
+ RETVAL=1;
+ ped_disk_destroy(disk);
+ }
+ }
+ OUTPUT:
+ RETVAL
+
#define BACKTRACE_DEPTH 20