summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWanlong Gao <gaowanlong@cn.fujitsu.com>2012-08-20 16:17:01 +0800
committerRichard W.M. Jones <rjones@redhat.com>2012-08-21 10:19:01 +0100
commitfaf548a4bdd36b476ee6838bfc7d0c134435a331 (patch)
tree502bec394f84864f3f2e6a09c2427603cb678ad7
parent11b78a710729c34c1ef921feb119569b7d580877 (diff)
downloadlibguestfs-faf548a4bdd36b476ee6838bfc7d0c134435a331.tar.gz
libguestfs-faf548a4bdd36b476ee6838bfc7d0c134435a331.tar.xz
libguestfs-faf548a4bdd36b476ee6838bfc7d0c134435a331.zip
xfs_growfs: drop the unstructed output
Just drop the unstructed output since we can get the structed info from xfs_info instead. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
-rw-r--r--daemon/xfs.c13
-rw-r--r--generator/generator_actions.ml2
2 files changed, 7 insertions, 8 deletions
diff --git a/daemon/xfs.c b/daemon/xfs.c
index 5f3eaaa5..f3058d36 100644
--- a/daemon/xfs.c
+++ b/daemon/xfs.c
@@ -351,7 +351,7 @@ error:
return ret;
}
-char *
+int
do_xfs_growfs (const char *path,
int datasec, int logsec, int rtsec,
int64_t datasize, int64_t logsize, int64_t rtsize,
@@ -359,7 +359,7 @@ do_xfs_growfs (const char *path,
{
int r;
char *buf;
- char *out = NULL, *err = NULL;
+ char *err = NULL;
const char *argv[MAX_ARGS];
char datasize_s[64];
char logsize_s[64];
@@ -371,7 +371,7 @@ do_xfs_growfs (const char *path,
buf = sysroot_path (path);
if (buf == NULL) {
reply_with_perror ("malloc");
- return NULL;
+ return -1;
}
ADD_ARG (argv, i, "xfs_growfs");
@@ -444,7 +444,7 @@ do_xfs_growfs (const char *path,
ADD_ARG (argv, i, buf);
ADD_ARG (argv, i, NULL);
- r = commandv (&out, &err, argv);
+ r = commandv (NULL, &err, argv);
free (buf);
if (r == -1) {
reply_with_error ("%s: %s", path, err);
@@ -452,13 +452,12 @@ do_xfs_growfs (const char *path,
}
free (err);
- return out;
+ return 0;
error:
if (buf) free (buf);
if (err) free (err);
- if (out) free (out);
- return NULL;
+ return -1;
}
int
diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml
index d29ec30c..f9baa2a2 100644
--- a/generator/generator_actions.ml
+++ b/generator/generator_actions.ml
@@ -9299,7 +9299,7 @@ in the returned structure is defined by the API." };
{ defaults with
name = "xfs_growfs";
- style = RString "info", [Pathname "path"], [OBool "datasec"; OBool "logsec"; OBool "rtsec"; OInt64 "datasize"; OInt64 "logsize"; OInt64 "rtsize"; OInt64 "rtextsize"; OInt "maxpct"];
+ style = RErr, [Pathname "path"], [OBool "datasec"; OBool "logsec"; OBool "rtsec"; OInt64 "datasize"; OInt64 "logsize"; OInt64 "rtsize"; OInt64 "rtextsize"; OInt "maxpct"];
proc_nr = Some 343;
optional = Some "xfs";
tests = [