X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=perl%2FGuestfs.xs;h=66eeb29494ebe6dce27c774854663ccd3ca613ee;hp=973f56e519ce463bf3dedf47a8c3b5cee54ccc60;hb=3e408f493496597dc026d20778837f421f05a9dd;hpb=e8ecc08f663b44f3d79517affe52f137858dfe00 diff --git a/perl/Guestfs.xs b/perl/Guestfs.xs index 973f56e..66eeb29 100644 --- a/perl/Guestfs.xs +++ b/perl/Guestfs.xs @@ -1787,3 +1787,163 @@ PREINIT: OUTPUT: RETVAL +void +zerofree (g, device) + guestfs_h *g; + char *device; +PREINIT: + int r; + PPCODE: + r = guestfs_zerofree (g, device); + if (r == -1) + croak ("zerofree: %s", guestfs_last_error (g)); + +void +pvresize (g, device) + guestfs_h *g; + char *device; +PREINIT: + int r; + PPCODE: + r = guestfs_pvresize (g, device); + if (r == -1) + croak ("pvresize: %s", guestfs_last_error (g)); + +void +sfdisk_N (g, device, n, cyls, heads, sectors, line) + guestfs_h *g; + char *device; + int n; + int cyls; + int heads; + int sectors; + char *line; +PREINIT: + int r; + PPCODE: + r = guestfs_sfdisk_N (g, device, n, cyls, heads, sectors, line); + if (r == -1) + croak ("sfdisk_N: %s", guestfs_last_error (g)); + +SV * +sfdisk_l (g, device) + guestfs_h *g; + char *device; +PREINIT: + char *partitions; + CODE: + partitions = guestfs_sfdisk_l (g, device); + if (partitions == NULL) + croak ("sfdisk_l: %s", guestfs_last_error (g)); + RETVAL = newSVpv (partitions, 0); + free (partitions); + OUTPUT: + RETVAL + +SV * +sfdisk_kernel_geometry (g, device) + guestfs_h *g; + char *device; +PREINIT: + char *partitions; + CODE: + partitions = guestfs_sfdisk_kernel_geometry (g, device); + if (partitions == NULL) + croak ("sfdisk_kernel_geometry: %s", guestfs_last_error (g)); + RETVAL = newSVpv (partitions, 0); + free (partitions); + OUTPUT: + RETVAL + +SV * +sfdisk_disk_geometry (g, device) + guestfs_h *g; + char *device; +PREINIT: + char *partitions; + CODE: + partitions = guestfs_sfdisk_disk_geometry (g, device); + if (partitions == NULL) + croak ("sfdisk_disk_geometry: %s", guestfs_last_error (g)); + RETVAL = newSVpv (partitions, 0); + free (partitions); + OUTPUT: + RETVAL + +void +vg_activate_all (g, activate) + guestfs_h *g; + int activate; +PREINIT: + int r; + PPCODE: + r = guestfs_vg_activate_all (g, activate); + if (r == -1) + croak ("vg_activate_all: %s", guestfs_last_error (g)); + +void +vg_activate (g, activate, volgroups) + guestfs_h *g; + int activate; + char **volgroups; +PREINIT: + int r; + PPCODE: + r = guestfs_vg_activate (g, activate, volgroups); + free (volgroups); + if (r == -1) + croak ("vg_activate: %s", guestfs_last_error (g)); + +void +lvresize (g, device, mbytes) + guestfs_h *g; + char *device; + int mbytes; +PREINIT: + int r; + PPCODE: + r = guestfs_lvresize (g, device, mbytes); + if (r == -1) + croak ("lvresize: %s", guestfs_last_error (g)); + +void +resize2fs (g, device) + guestfs_h *g; + char *device; +PREINIT: + int r; + PPCODE: + r = guestfs_resize2fs (g, device); + if (r == -1) + croak ("resize2fs: %s", guestfs_last_error (g)); + +void +find (g, directory) + guestfs_h *g; + char *directory; +PREINIT: + char **names; + int i, n; + PPCODE: + names = guestfs_find (g, directory); + if (names == NULL) + croak ("find: %s", guestfs_last_error (g)); + for (n = 0; names[n] != NULL; ++n) /**/; + EXTEND (SP, n); + for (i = 0; i < n; ++i) { + PUSHs (sv_2mortal (newSVpv (names[i], 0))); + free (names[i]); + } + free (names); + +void +e2fsck_f (g, device) + guestfs_h *g; + char *device; +PREINIT: + int r; + PPCODE: + r = guestfs_e2fsck_f (g, device); + if (r == -1) + croak ("e2fsck_f: %s", guestfs_last_error (g)); +