#include "../src/guestfs_protocol.h"
-extern int do_mount (const char *device, const char *mountpoint);
+extern int do_mount (char *device, char *mountpoint);
extern int do_sync (void);
-extern int do_touch (const char *path);
-extern char *do_cat (const char *path);
-extern char *do_ll (const char *directory);
-extern char **do_ls (const char *directory);
+extern int do_touch (char *path);
+extern char *do_cat (char *path);
+extern char *do_ll (char *directory);
+extern char **do_ls (char *directory);
extern char **do_list_devices (void);
extern char **do_list_partitions (void);
extern char **do_pvs (void);
extern guestfs_lvm_int_pv_list *do_pvs_full (void);
extern guestfs_lvm_int_vg_list *do_vgs_full (void);
extern guestfs_lvm_int_lv_list *do_lvs_full (void);
-extern char **do_read_lines (const char *path);
-extern int do_aug_init (const char *root, int flags);
+extern char **do_read_lines (char *path);
+extern int do_aug_init (char *root, int flags);
extern int do_aug_close (void);
-extern int do_aug_defvar (const char *name, const char *expr);
-extern guestfs_aug_defnode_ret *do_aug_defnode (const char *name, const char *expr, const char *val);
-extern char *do_aug_get (const char *path);
-extern int do_aug_set (const char *path, const char *val);
-extern int do_aug_insert (const char *path, const char *label, int before);
-extern int do_aug_rm (const char *path);
-extern int do_aug_mv (const char *src, const char *dest);
-extern char **do_aug_match (const char *path);
+extern int do_aug_defvar (char *name, char *expr);
+extern guestfs_aug_defnode_ret *do_aug_defnode (char *name, char *expr, char *val);
+extern char *do_aug_get (char *path);
+extern int do_aug_set (char *path, char *val);
+extern int do_aug_insert (char *path, char *label, int before);
+extern int do_aug_rm (char *path);
+extern int do_aug_mv (char *src, char *dest);
+extern char **do_aug_match (char *path);
extern int do_aug_save (void);
extern int do_aug_load (void);
-extern char **do_aug_ls (const char *path);
-extern int do_rm (const char *path);
-extern int do_rmdir (const char *path);
-extern int do_rm_rf (const char *path);
-extern int do_mkdir (const char *path);
-extern int do_mkdir_p (const char *path);
-extern int do_chmod (int mode, const char *path);
-extern int do_chown (int owner, int group, const char *path);
-extern int do_exists (const char *path);
-extern int do_is_file (const char *path);
-extern int do_is_dir (const char *path);
-extern int do_pvcreate (const char *device);
-extern int do_vgcreate (const char *volgroup, char * const* const physvols);
-extern int do_lvcreate (const char *logvol, const char *volgroup, int mbytes);
-extern int do_mkfs (const char *fstype, const char *device);
-extern int do_sfdisk (const char *device, int cyls, int heads, int sectors, char * const* const lines);
-extern int do_write_file (const char *path, const char *content, int size);
-extern int do_umount (const char *pathordevice);
+extern char **do_aug_ls (char *path);
+extern int do_rm (char *path);
+extern int do_rmdir (char *path);
+extern int do_rm_rf (char *path);
+extern int do_mkdir (char *path);
+extern int do_mkdir_p (char *path);
+extern int do_chmod (int mode, char *path);
+extern int do_chown (int owner, int group, char *path);
+extern int do_exists (char *path);
+extern int do_is_file (char *path);
+extern int do_is_dir (char *path);
+extern int do_pvcreate (char *device);
+extern int do_vgcreate (char *volgroup, char **physvols);
+extern int do_lvcreate (char *logvol, char *volgroup, int mbytes);
+extern int do_mkfs (char *fstype, char *device);
+extern int do_sfdisk (char *device, int cyls, int heads, int sectors, char **lines);
+extern int do_write_file (char *path, char *content, int size);
+extern int do_umount (char *pathordevice);
extern char **do_mounts (void);
extern int do_umount_all (void);
extern int do_lvm_remove_all (void);
-extern char *do_file (const char *path);
-extern char *do_command (char * const* const arguments);
-extern char **do_command_lines (char * const* const arguments);
-extern guestfs_int_stat *do_stat (const char *path);
-extern guestfs_int_stat *do_lstat (const char *path);
-extern guestfs_int_statvfs *do_statvfs (const char *path);
-extern char **do_tune2fs_l (const char *device);
-extern int do_blockdev_setro (const char *device);
-extern int do_blockdev_setrw (const char *device);
-extern int do_blockdev_getro (const char *device);
-extern int do_blockdev_getss (const char *device);
-extern int do_blockdev_getbsz (const char *device);
-extern int do_blockdev_setbsz (const char *device, int blocksize);
-extern int64_t do_blockdev_getsz (const char *device);
-extern int64_t do_blockdev_getsize64 (const char *device);
-extern int do_blockdev_flushbufs (const char *device);
-extern int do_blockdev_rereadpt (const char *device);
-extern int do_upload (const char *remotefilename);
-extern int do_download (const char *remotefilename);
-extern char *do_checksum (const char *csumtype, const char *path);
-extern int do_tar_in (const char *directory);
-extern int do_tar_out (const char *directory);
-extern int do_tgz_in (const char *directory);
-extern int do_tgz_out (const char *directory);
-extern int do_mount_ro (const char *device, const char *mountpoint);
-extern int do_mount_options (const char *options, const char *device, const char *mountpoint);
-extern int do_mount_vfs (const char *options, const char *vfstype, const char *device, const char *mountpoint);
-extern char *do_debug (const char *subcmd, char * const* const extraargs);
-extern int do_lvremove (const char *device);
-extern int do_vgremove (const char *vgname);
-extern int do_pvremove (const char *device);
-extern int do_set_e2label (const char *device, const char *label);
-extern char *do_get_e2label (const char *device);
-extern int do_set_e2uuid (const char *device, const char *uuid);
-extern char *do_get_e2uuid (const char *device);
-extern int do_fsck (const char *fstype, const char *device);
-extern int do_zero (const char *device);
-extern int do_grub_install (const char *root, const char *device);
-extern int do_cp (const char *src, const char *dest);
-extern int do_cp_a (const char *src, const char *dest);
-extern int do_mv (const char *src, const char *dest);
+extern char *do_file (char *path);
+extern char *do_command (char **arguments);
+extern char **do_command_lines (char **arguments);
+extern guestfs_int_stat *do_stat (char *path);
+extern guestfs_int_stat *do_lstat (char *path);
+extern guestfs_int_statvfs *do_statvfs (char *path);
+extern char **do_tune2fs_l (char *device);
+extern int do_blockdev_setro (char *device);
+extern int do_blockdev_setrw (char *device);
+extern int do_blockdev_getro (char *device);
+extern int do_blockdev_getss (char *device);
+extern int do_blockdev_getbsz (char *device);
+extern int do_blockdev_setbsz (char *device, int blocksize);
+extern int64_t do_blockdev_getsz (char *device);
+extern int64_t do_blockdev_getsize64 (char *device);
+extern int do_blockdev_flushbufs (char *device);
+extern int do_blockdev_rereadpt (char *device);
+extern int do_upload (char *remotefilename);
+extern int do_download (char *remotefilename);
+extern char *do_checksum (char *csumtype, char *path);
+extern int do_tar_in (char *directory);
+extern int do_tar_out (char *directory);
+extern int do_tgz_in (char *directory);
+extern int do_tgz_out (char *directory);
+extern int do_mount_ro (char *device, char *mountpoint);
+extern int do_mount_options (char *options, char *device, char *mountpoint);
+extern int do_mount_vfs (char *options, char *vfstype, char *device, char *mountpoint);
+extern char *do_debug (char *subcmd, char **extraargs);
+extern int do_lvremove (char *device);
+extern int do_vgremove (char *vgname);
+extern int do_pvremove (char *device);
+extern int do_set_e2label (char *device, char *label);
+extern char *do_get_e2label (char *device);
+extern int do_set_e2uuid (char *device, char *uuid);
+extern char *do_get_e2uuid (char *device);
+extern int do_fsck (char *fstype, char *device);
+extern int do_zero (char *device);
+extern int do_grub_install (char *root, char *device);
+extern int do_cp (char *src, char *dest);
+extern int do_cp_a (char *src, char *dest);
+extern int do_mv (char *src, char *dest);
extern int do_drop_caches (int whattodrop);
extern char *do_dmesg (void);
extern int do_ping_daemon (void);
-extern int do_equal (const char *file1, const char *file2);
-extern char **do_strings (const char *path);
-extern char **do_strings_e (const char *encoding, const char *path);
-extern char *do_hexdump (const char *path);
-extern int do_zerofree (const char *device);
-extern int do_pvresize (const char *device);
-extern int do_sfdisk_N (const char *device, int n, int cyls, int heads, int sectors, const char *line);
-extern char *do_sfdisk_l (const char *device);
-extern char *do_sfdisk_kernel_geometry (const char *device);
-extern char *do_sfdisk_disk_geometry (const char *device);
+extern int do_equal (char *file1, char *file2);
+extern char **do_strings (char *path);
+extern char **do_strings_e (char *encoding, char *path);
+extern char *do_hexdump (char *path);
+extern int do_zerofree (char *device);
+extern int do_pvresize (char *device);
+extern int do_sfdisk_N (char *device, int n, int cyls, int heads, int sectors, char *line);
+extern char *do_sfdisk_l (char *device);
+extern char *do_sfdisk_kernel_geometry (char *device);
+extern char *do_sfdisk_disk_geometry (char *device);
extern int do_vg_activate_all (int activate);
-extern int do_vg_activate (int activate, char * const* const volgroups);
-extern int do_lvresize (const char *device, int mbytes);
-extern int do_resize2fs (const char *device);
-extern char **do_find (const char *directory);
-extern int do_e2fsck_f (const char *device);
+extern int do_vg_activate (int activate, char **volgroups);
+extern int do_lvresize (char *device, int mbytes);
+extern int do_resize2fs (char *device);
+extern char **do_find (char *directory);
+extern int do_e2fsck_f (char *device);
extern int do_sleep (int secs);
-extern int do_ntfs_3g_probe (int rw, const char *device);
+extern int do_ntfs_3g_probe (int rw, char *device);
/* We need to rewrite the root path so it is based at /sysroot. */
int
-do_aug_init (const char *root, int flags)
+do_aug_init (char *root, int flags)
{
#ifdef HAVE_AUGEAS
char *buf;
}
int
-do_aug_defvar (const char *name, const char *expr)
+do_aug_defvar (char *name, char *expr)
{
#ifdef HAVE_AUG_DEFVAR
int r;
}
guestfs_aug_defnode_ret *
-do_aug_defnode (const char *name, const char *expr, const char *val)
+do_aug_defnode (char *name, char *expr, char *val)
{
#ifdef HAVE_AUG_DEFNODE
static guestfs_aug_defnode_ret r;
}
char *
-do_aug_get (const char *path)
+do_aug_get (char *path)
{
#ifdef HAVE_AUGEAS
const char *value = NULL;
}
int
-do_aug_set (const char *path, const char *val)
+do_aug_set (char *path, char *val)
{
#ifdef HAVE_AUGEAS
int r;
}
int
-do_aug_insert (const char *path, const char *label, int before)
+do_aug_insert (char *path, char *label, int before)
{
#ifdef HAVE_AUGEAS
int r;
}
int
-do_aug_rm (const char *path)
+do_aug_rm (char *path)
{
#ifdef HAVE_AUGEAS
int r;
}
int
-do_aug_mv (const char *src, const char *dest)
+do_aug_mv (char *src, char *dest)
{
#ifdef HAVE_AUGEAS
int r;
}
char **
-do_aug_match (const char *path)
+do_aug_match (char *path)
{
#ifdef HAVE_AUGEAS
char **matches = NULL;
/* Simpler version of aug-match, which also sorts the output. */
char **
-do_aug_ls (const char *path)
+do_aug_ls (char *path)
{
#ifdef HAVE_AUGEAS
char **matches;
* we centralize it in one call.
*/
static int64_t
-call_blockdev (const char *device, const char *switc, int extraarg, int prints)
+call_blockdev (char *device, char *switc, int extraarg, int prints)
{
int r;
int64_t rv;
}
int
-do_blockdev_setro (const char *device)
+do_blockdev_setro (char *device)
{
return (int) call_blockdev (device, "--setro", 0, 0);
}
int
-do_blockdev_setrw (const char *device)
+do_blockdev_setrw (char *device)
{
return (int) call_blockdev (device, "--setrw", 0, 0);
}
int
-do_blockdev_getro (const char *device)
+do_blockdev_getro (char *device)
{
return (int) call_blockdev (device, "--getro", 0, 1);
}
int
-do_blockdev_getss (const char *device)
+do_blockdev_getss (char *device)
{
return (int) call_blockdev (device, "--getss", 0, 1);
}
int
-do_blockdev_getbsz (const char *device)
+do_blockdev_getbsz (char *device)
{
return (int) call_blockdev (device, "--getbsz", 0, 1);
}
int
-do_blockdev_setbsz (const char *device, int blocksize)
+do_blockdev_setbsz (char *device, int blocksize)
{
if (blocksize <= 0 /* || blocksize >= what? */) {
reply_with_error ("blockdev_setbsz: blocksize must be > 0");
}
int64_t
-do_blockdev_getsz (const char *device)
+do_blockdev_getsz (char *device)
{
return call_blockdev (device, "--getsz", 0, 1);
}
int64_t
-do_blockdev_getsize64 (const char *device)
+do_blockdev_getsize64 (char *device)
{
return call_blockdev (device, "--getsize64", 0, 1);
}
int
-do_blockdev_flushbufs (const char *device)
+do_blockdev_flushbufs (char *device)
{
return call_blockdev (device, "--flushbufs", 0, 0);
}
int
-do_blockdev_rereadpt (const char *device)
+do_blockdev_rereadpt (char *device)
{
return call_blockdev (device, "--rereadpt", 0, 0);
}
#include "actions.h"
char *
-do_checksum (const char *csumtype, const char *path)
+do_checksum (char *csumtype, char *path)
{
const char *program;
char *buf;
#include "actions.h"
int
-do_equal (const char *file1, const char *file2)
+do_equal (char *file1, char *file2)
{
char *file1buf, *file2buf;
int file1len, file2len;
#include "actions.h"
char *
-do_command (char * const * const argv)
+do_command (char **argv)
{
char *out, *err;
int r;
}
char **
-do_command_lines (char * const * const argv)
+do_command_lines (char **argv)
{
char *out;
char **lines;
static int cpmv_cmd (const char *cmd, const char *flags, const char *src, const char *dest);
int
-do_cp (const char *src, const char *dest)
+do_cp (char *src, char *dest)
{
return cpmv_cmd ("cp", NULL, src, dest);
}
int
-do_cp_a (const char *src, const char *dest)
+do_cp_a (char *src, char *dest)
{
return cpmv_cmd ("cp", "-a", src, dest);
}
int
-do_mv (const char *src, const char *dest)
+do_mv (char *src, char *dest)
{
return cpmv_cmd ("mv", NULL, src, dest);
}
#endif
char *
-do_debug (const char *subcmd, char *const *const argv)
+do_debug (char *subcmd, char **argv)
{
#if ENABLE_DEBUG_COMMAND
int argc, i;
}
int
-do_mkfs (const char *fstype, const char *device)
+do_mkfs (char *fstype, char *device)
{
char *err;
int r;
#include "actions.h"
int
-do_rmdir (const char *path)
+do_rmdir (char *path)
{
int r;
* do stupid stuff, who are we to try to stop them?
*/
int
-do_rm_rf (const char *path)
+do_rm_rf (char *path)
{
int r, len;
char *buf, *err;
}
int
-do_mkdir (const char *path)
+do_mkdir (char *path)
{
int r;
}
int
-do_mkdir_p (const char *path)
+do_mkdir_p (char *path)
{
int r;
}
int
-do_is_dir (const char *path)
+do_is_dir (char *path)
{
int r;
struct stat buf;
#include "actions.h"
char **
-do_tune2fs_l (const char *device)
+do_tune2fs_l (char *device)
{
int r;
char *out, *err;
}
int
-do_set_e2label (const char *device, const char *label)
+do_set_e2label (char *device, char *label)
{
int r;
char *err;
}
char *
-do_get_e2label (const char *device)
+do_get_e2label (char *device)
{
int r, len;
char *out, *err;
}
int
-do_set_e2uuid (const char *device, const char *uuid)
+do_set_e2uuid (char *device, char *uuid)
{
int r;
char *err;
}
char *
-do_get_e2uuid (const char *device)
+do_get_e2uuid (char *device)
{
int r;
char *out, *err, *p, *q;
}
int
-do_resize2fs (const char *device)
+do_resize2fs (char *device)
{
char *err;
int r;
}
int
-do_e2fsck_f (const char *device)
+do_e2fsck_f (char *device)
{
char *err;
int r;
#include "actions.h"
int
-do_touch (const char *path)
+do_touch (char *path)
{
int fd;
int r;
}
char *
-do_cat (const char *path)
+do_cat (char *path)
{
int fd;
int alloc, size, r, max;
}
char **
-do_read_lines (const char *path)
+do_read_lines (char *path)
{
char **r = NULL;
int size = 0, alloc = 0;
}
int
-do_rm (const char *path)
+do_rm (char *path)
{
int r;
}
int
-do_chmod (int mode, const char *path)
+do_chmod (int mode, char *path)
{
int r;
}
int
-do_chown (int owner, int group, const char *path)
+do_chown (int owner, int group, char *path)
{
int r;
}
int
-do_exists (const char *path)
+do_exists (char *path)
{
int r;
}
int
-do_is_file (const char *path)
+do_is_file (char *path)
{
int r;
struct stat buf;
}
int
-do_write_file (const char *path, const char *content, int size)
+do_write_file (char *path, char *content, int size)
{
int fd;
/* This runs the 'file' command. */
char *
-do_file (const char *path)
+do_file (char *path)
{
char *out, *err;
int r, len, freeit = 0;
}
char **
-do_find (const char *dir)
+do_find (char *dir)
{
struct stat statbuf;
int r, len, sysrootdirlen;
#include "actions.h"
int
-do_fsck (const char *fstype, const char *device)
+do_fsck (char *fstype, char *device)
{
char *err;
int r;
#include "actions.h"
int
-do_grub_install (const char *root, const char *device)
+do_grub_install (char *root, char *device)
{
int r, len;
char *err;
#include "actions.h"
char *
-do_hexdump (const char *path)
+do_hexdump (char *path)
{
int len;
char *buf;
#include "actions.h"
char **
-do_ls (const char *path)
+do_ls (char *path)
{
char **r = NULL;
int size = 0, alloc = 0;
}
char *
-do_ll (const char *path)
+do_ll (char *path)
{
int r, len;
char *out, *err;
}
int
-do_pvcreate (const char *device)
+do_pvcreate (char *device)
{
char *err;
int r;
}
int
-do_vgcreate (const char *volgroup, char * const* const physvols)
+do_vgcreate (char *volgroup, char **physvols)
{
char *err;
int r, argc, i;
const char **argv;
- Xphysvols;
+ /* Check they are devices and also do device name translation. */
+ for (i = 0; physvols[i] != NULL; ++i)
+ IS_DEVICE (physvols[i], -1);
argc = count_strings (physvols) + 3;
argv = malloc (sizeof (char *) * (argc + 1));
}
int
-do_lvcreate (const char *logvol, const char *volgroup, int mbytes)
+do_lvcreate (char *logvol, char *volgroup, int mbytes)
{
char *err;
int r;
}
int
-do_lvresize (const char *logvol, int mbytes)
+do_lvresize (char *logvol, int mbytes)
{
char *err;
int r;
}
int
-do_lvremove (const char *device)
+do_lvremove (char *device)
{
char *err;
int r;
}
int
-do_vgremove (const char *device)
+do_vgremove (char *device)
{
char *err;
int r;
- IS_DEVICE (device, -1);
-
r = command (NULL, &err,
"/sbin/lvm", "vgremove", "-f", device, NULL);
if (r == -1) {
}
int
-do_pvremove (const char *device)
+do_pvremove (char *device)
{
char *err;
int r;
}
int
-do_pvresize (const char *device)
+do_pvresize (char *device)
{
char *err;
int r;
}
int
-do_vg_activate (int activate, char * const* const volgroups)
+do_vg_activate (int activate, char **volgroups)
{
char *err;
int r, i, argc;
*/
int
-do_mount_vfs (const char *options, const char *vfstype,
- const char *device, const char *mountpoint)
+do_mount_vfs (char *options, char *vfstype,
+ char *device, char *mountpoint)
{
int len, r, is_root;
char *mp;
}
int
-do_mount (const char *device, const char *mountpoint)
+do_mount (char *device, char *mountpoint)
{
return do_mount_vfs ("sync,noatime", NULL, device, mountpoint);
}
int
-do_mount_ro (const char *device, const char *mountpoint)
+do_mount_ro (char *device, char *mountpoint)
{
return do_mount_vfs ("ro", NULL, device, mountpoint);
}
int
-do_mount_options (const char *options, const char *device,
- const char *mountpoint)
+do_mount_options (char *options, char *device,
+ char *mountpoint)
{
return do_mount_vfs (options, NULL, device, mountpoint);
}
* is kept updated.
*/
int
-do_umount (const char *pathordevice)
+do_umount (char *pathordevice)
{
int len, freeit = 0, r;
char *buf;
#include "actions.h"
int
-do_ntfs_3g_probe (int rw, const char *device)
+do_ntfs_3g_probe (int rw, char *device)
{
char *err;
int r;
}
int
-do_sfdisk (const char *device, int cyls, int heads, int sectors,
- char * const* const lines)
+do_sfdisk (char *device, int cyls, int heads, int sectors,
+ char **lines)
{
return sfdisk (device, 0, cyls, heads, sectors, lines);
}
int
-do_sfdisk_N (const char *device, int n, int cyls, int heads, int sectors,
- const char *line)
+do_sfdisk_N (char *device, int n, int cyls, int heads, int sectors,
+ char *line)
{
const char *lines[2] = { line, NULL };
}
char *
-do_sfdisk_l (const char *device)
+do_sfdisk_l (char *device)
{
return sfdisk_flag (device, "-l");
}
char *
-do_sfdisk_kernel_geometry (const char *device)
+do_sfdisk_kernel_geometry (char *device)
{
return sfdisk_flag (device, "-g");
}
char *
-do_sfdisk_disk_geometry (const char *device)
+do_sfdisk_disk_geometry (char *device)
{
return sfdisk_flag (device, "-G");
}
#include "actions.h"
guestfs_int_stat *
-do_stat (const char *path)
+do_stat (char *path)
{
int r;
guestfs_int_stat *ret;
}
guestfs_int_stat *
-do_lstat (const char *path)
+do_lstat (char *path)
{
int r;
guestfs_int_stat *ret;
}
guestfs_int_statvfs *
-do_statvfs (const char *path)
+do_statvfs (char *path)
{
int r;
guestfs_int_statvfs *ret;
#include "actions.h"
char **
-do_strings_e (const char *encoding, const char *path)
+do_strings_e (char *encoding, char *path)
{
int len;
char *buf;
}
char **
-do_strings (const char *path)
+do_strings (char *path)
{
return do_strings_e ("s", path);
}
{
int r;
struct guestfs_mount_args args;
- const char *device;
- const char *mountpoint;
+ char *device;
+ char *mountpoint;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_touch_args args;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
{
char *r;
struct guestfs_cat_args args;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
{
char *r;
struct guestfs_ll_args args;
- const char *directory;
+ char *directory;
memset (&args, 0, sizeof args);
{
char **r;
struct guestfs_ls_args args;
- const char *directory;
+ char *directory;
memset (&args, 0, sizeof args);
{
char **r;
struct guestfs_read_lines_args args;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_aug_init_args args;
- const char *root;
+ char *root;
int flags;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_aug_defvar_args args;
- const char *name;
- const char *expr;
+ char *name;
+ char *expr;
memset (&args, 0, sizeof args);
{
guestfs_aug_defnode_ret *r;
struct guestfs_aug_defnode_args args;
- const char *name;
- const char *expr;
- const char *val;
+ char *name;
+ char *expr;
+ char *val;
memset (&args, 0, sizeof args);
{
char *r;
struct guestfs_aug_get_args args;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_aug_set_args args;
- const char *path;
- const char *val;
+ char *path;
+ char *val;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_aug_insert_args args;
- const char *path;
- const char *label;
+ char *path;
+ char *label;
int before;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_aug_rm_args args;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_aug_mv_args args;
- const char *src;
- const char *dest;
+ char *src;
+ char *dest;
memset (&args, 0, sizeof args);
{
char **r;
struct guestfs_aug_match_args args;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
{
char **r;
struct guestfs_aug_ls_args args;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_rm_args args;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_rmdir_args args;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_rm_rf_args args;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_mkdir_args args;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_mkdir_p_args args;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
int r;
struct guestfs_chmod_args args;
int mode;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
struct guestfs_chown_args args;
int owner;
int group;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_exists_args args;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_is_file_args args;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_is_dir_args args;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_pvcreate_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_vgcreate_args args;
- const char *volgroup;
+ char *volgroup;
char **physvols;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_lvcreate_args args;
- const char *logvol;
- const char *volgroup;
+ char *logvol;
+ char *volgroup;
int mbytes;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_mkfs_args args;
- const char *fstype;
- const char *device;
+ char *fstype;
+ char *device;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_sfdisk_args args;
- const char *device;
+ char *device;
int cyls;
int heads;
int sectors;
{
int r;
struct guestfs_write_file_args args;
- const char *path;
- const char *content;
+ char *path;
+ char *content;
int size;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_umount_args args;
- const char *pathordevice;
+ char *pathordevice;
memset (&args, 0, sizeof args);
{
char *r;
struct guestfs_file_args args;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
{
guestfs_int_stat *r;
struct guestfs_stat_args args;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
{
guestfs_int_stat *r;
struct guestfs_lstat_args args;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
{
guestfs_int_statvfs *r;
struct guestfs_statvfs_args args;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
{
char **r;
struct guestfs_tune2fs_l_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_blockdev_setro_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_blockdev_setrw_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_blockdev_getro_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_blockdev_getss_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_blockdev_getbsz_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_blockdev_setbsz_args args;
- const char *device;
+ char *device;
int blocksize;
memset (&args, 0, sizeof args);
{
int64_t r;
struct guestfs_blockdev_getsz_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
int64_t r;
struct guestfs_blockdev_getsize64_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_blockdev_flushbufs_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_blockdev_rereadpt_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_upload_args args;
- const char *remotefilename;
+ char *remotefilename;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_download_args args;
- const char *remotefilename;
+ char *remotefilename;
memset (&args, 0, sizeof args);
{
char *r;
struct guestfs_checksum_args args;
- const char *csumtype;
- const char *path;
+ char *csumtype;
+ char *path;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_tar_in_args args;
- const char *directory;
+ char *directory;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_tar_out_args args;
- const char *directory;
+ char *directory;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_tgz_in_args args;
- const char *directory;
+ char *directory;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_tgz_out_args args;
- const char *directory;
+ char *directory;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_mount_ro_args args;
- const char *device;
- const char *mountpoint;
+ char *device;
+ char *mountpoint;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_mount_options_args args;
- const char *options;
- const char *device;
- const char *mountpoint;
+ char *options;
+ char *device;
+ char *mountpoint;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_mount_vfs_args args;
- const char *options;
- const char *vfstype;
- const char *device;
- const char *mountpoint;
+ char *options;
+ char *vfstype;
+ char *device;
+ char *mountpoint;
memset (&args, 0, sizeof args);
{
char *r;
struct guestfs_debug_args args;
- const char *subcmd;
+ char *subcmd;
char **extraargs;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_lvremove_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_vgremove_args args;
- const char *vgname;
+ char *vgname;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_pvremove_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_set_e2label_args args;
- const char *device;
- const char *label;
+ char *device;
+ char *label;
memset (&args, 0, sizeof args);
{
char *r;
struct guestfs_get_e2label_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_set_e2uuid_args args;
- const char *device;
- const char *uuid;
+ char *device;
+ char *uuid;
memset (&args, 0, sizeof args);
{
char *r;
struct guestfs_get_e2uuid_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_fsck_args args;
- const char *fstype;
- const char *device;
+ char *fstype;
+ char *device;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_zero_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_grub_install_args args;
- const char *root;
- const char *device;
+ char *root;
+ char *device;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_cp_args args;
- const char *src;
- const char *dest;
+ char *src;
+ char *dest;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_cp_a_args args;
- const char *src;
- const char *dest;
+ char *src;
+ char *dest;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_mv_args args;
- const char *src;
- const char *dest;
+ char *src;
+ char *dest;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_equal_args args;
- const char *file1;
- const char *file2;
+ char *file1;
+ char *file2;
memset (&args, 0, sizeof args);
{
char **r;
struct guestfs_strings_args args;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
{
char **r;
struct guestfs_strings_e_args args;
- const char *encoding;
- const char *path;
+ char *encoding;
+ char *path;
memset (&args, 0, sizeof args);
{
char *r;
struct guestfs_hexdump_args args;
- const char *path;
+ char *path;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_zerofree_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_pvresize_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_sfdisk_N_args args;
- const char *device;
+ char *device;
int n;
int cyls;
int heads;
int sectors;
- const char *line;
+ char *line;
memset (&args, 0, sizeof args);
{
char *r;
struct guestfs_sfdisk_l_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
char *r;
struct guestfs_sfdisk_kernel_geometry_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
char *r;
struct guestfs_sfdisk_disk_geometry_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_lvresize_args args;
- const char *device;
+ char *device;
int mbytes;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_resize2fs_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
{
char **r;
struct guestfs_find_args args;
- const char *directory;
+ char *directory;
memset (&args, 0, sizeof args);
{
int r;
struct guestfs_e2fsck_f_args args;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
int r;
struct guestfs_ntfs_3g_probe_args args;
int rw;
- const char *device;
+ char *device;
memset (&args, 0, sizeof args);
/* Has one FileIn parameter. */
int
-do_tar_in (const char *dir)
+do_tar_in (char *dir)
{
int err, r, len;
FILE *fp;
/* Has one FileOut parameter. */
int
-do_tar_out (const char *dir)
+do_tar_out (char *dir)
{
int r, len;
FILE *fp;
/* Has one FileIn parameter. */
int
-do_tgz_in (const char *dir)
+do_tgz_in (char *dir)
{
int err, r, len;
FILE *fp;
/* Has one FileOut parameter. */
int
-do_tgz_out (const char *dir)
+do_tgz_out (char *dir)
{
int r, len;
FILE *fp;
/* Has one FileIn parameter. */
int
-do_upload (const char *filename)
+do_upload (char *filename)
{
int err, fd, r, is_dev;
/* Has one FileOut parameter. */
int
-do_download (const char *filename)
+do_download (char *filename)
{
int fd, r, is_dev;
char buf[GUESTFS_MAX_CHUNK_SIZE];
#include "actions.h"
int
-do_zero (const char *device)
+do_zero (char *device)
{
int fd, i;
char buf[4096];
#include "actions.h"
int
-do_zerofree (const char *device)
+do_zerofree (char *device)
{
char *err;
int r;
pr " struct guestfs_%s_args args;\n" name;
List.iter (
function
+ (* Note we allow the string to be writable, in order to
+ * allow device name translation. This is safe because
+ * we can modify the string (passed from RPC).
+ *)
| String n
- | OptString n -> pr " const char *%s;\n" n
+ | OptString n -> pr " char *%s;\n" n
| StringList n -> pr " char **%s;\n" n
| Bool n -> pr " int %s;\n" n
| Int n -> pr " int %s;\n" n
List.iter (
function
| String n
- | OptString n -> next (); pr "const char *%s" n
- | StringList n -> next (); pr "char * const* const %s" n
+ | OptString n ->
+ next ();
+ if not in_daemon then pr "const char *%s" n
+ else pr "char *%s" n
+ | StringList n ->
+ next ();
+ if not in_daemon then pr "char * const* const %s" n
+ else pr "char **%s" n
| Bool n -> next (); pr "int %s" n
| Int n -> next (); pr "int %s" n
| FileIn n