summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-11-08 11:55:38 +0000
committerRichard Jones <rjones@redhat.com>2009-11-09 11:05:19 +0000
commit3cf719bc077a5f0d4f1a79279a5ba6e41d53c9b9 (patch)
tree2a2a21508e654a3f0aeccd34051a7e3a4c7e68f6
parenta25d175cf6e8283288fd6d209b37b09ffee0dcf3 (diff)
downloadlibguestfs-3cf719bc077a5f0d4f1a79279a5ba6e41d53c9b9.tar.gz
libguestfs-3cf719bc077a5f0d4f1a79279a5ba6e41d53c9b9.tar.xz
libguestfs-3cf719bc077a5f0d4f1a79279a5ba6e41d53c9b9.zip
Fix prototype of commandv to match prototype of commandrv.
-rw-r--r--daemon/blockdev.c2
-rw-r--r--daemon/command.c2
-rw-r--r--daemon/daemon.h2
-rw-r--r--daemon/guestfsd.c5
-rw-r--r--daemon/lvm.c4
5 files changed, 8 insertions, 7 deletions
diff --git a/daemon/blockdev.c b/daemon/blockdev.c
index 1aa6eaa2..4d3c2ab0 100644
--- a/daemon/blockdev.c
+++ b/daemon/blockdev.c
@@ -53,7 +53,7 @@ call_blockdev (const char *device, const char *switc, int extraarg, int prints)
} else
argv[2] = device;
- r = commandv (&out, &err, (char **) argv);
+ r = commandv (&out, &err, argv);
if (r == -1) {
reply_with_error ("%s: %s", argv[0], err);
diff --git a/daemon/command.c b/daemon/command.c
index b2b5ef91..b2350ecb 100644
--- a/daemon/command.c
+++ b/daemon/command.c
@@ -85,7 +85,7 @@ do_command (char *const *argv)
sys_ok = r != -1;
CHROOT_IN;
- r = commandv (&out, &err, argv);
+ r = commandv (&out, &err, (const char * const *) argv);
CHROOT_OUT;
if (sys_ok) command (NULL, NULL, "umount", sysroot_sys, NULL);
diff --git a/daemon/daemon.h b/daemon/daemon.h
index f0826904..bfdde9d3 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -59,7 +59,7 @@ extern int commandf (char **stdoutput, char **stderror, int flags,
extern int commandrf (char **stdoutput, char **stderror, int flags,
const char *name, ...);
extern int commandvf (char **stdoutput, char **stderror, int flags,
- char *const *argv);
+ char const *const *argv);
extern int commandrvf (char **stdoutput, char **stderror, int flags,
char const* const *argv);
diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c
index 370eea8d..b6c3c448 100644
--- a/daemon/guestfsd.c
+++ b/daemon/guestfsd.c
@@ -548,7 +548,7 @@ commandf (char **stdoutput, char **stderror, int flags, const char *name, ...)
va_end (args);
- r = commandvf (stdoutput, stderror, flags, (char **) argv);
+ r = commandvf (stdoutput, stderror, flags, (const char * const*) argv);
/* NB: Mustn't free the strings which are on the stack. */
free (argv);
@@ -605,7 +605,8 @@ commandrf (char **stdoutput, char **stderror, int flags, const char *name, ...)
/* Same as 'command', but passing an argv. */
int
-commandvf (char **stdoutput, char **stderror, int flags, char *const *argv)
+commandvf (char **stdoutput, char **stderror, int flags,
+ char const *const *argv)
{
int r;
diff --git a/daemon/lvm.c b/daemon/lvm.c
index 9865bb23..3920e95b 100644
--- a/daemon/lvm.c
+++ b/daemon/lvm.c
@@ -210,7 +210,7 @@ do_vgcreate (const char *volgroup, char *const *physvols)
for (i = 3; i <= argc; ++i)
argv[i] = physvols[i-3];
- r = commandv (NULL, &err, (char **) argv);
+ r = commandv (NULL, &err, (const char * const*) argv);
if (r == -1) {
reply_with_error ("%s", err);
free (err);
@@ -440,7 +440,7 @@ do_vg_activate (int activate, char *const *volgroups)
for (i = 4; i <= argc; ++i)
argv[i] = volgroups[i-4];
- r = commandv (NULL, &err, (char **) argv);
+ r = commandv (NULL, &err, (const char * const*) argv);
if (r == -1) {
reply_with_error ("vgchange: %s", err);
free (err);