[PATCH] xfs: add new api xfs_admin
Add new api xfs_admin to change parameters of an XFS filesystem. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> --- daemon/xfs.c | 78 ++++++++++++++++++++++++++++++++++++++++++ generator/generator_actions.ml | 21 ++++++++++++ gobject/Makefile.inc | 6 ++-- guestfs-release-notes.txt | 1 + po/POTFILES | 1 + src/MAX_PROC_NR | 2 +- 6 files changed, 106 insertions(+), 3 deletions(-) diff --git a/daemon/xfs.c b/daemon/xfs.c index b331b9b..b32d256 100644 --- a/daemon/xfs.c +++ b/daemon/xfs.c @@ -460,3 +460,81 @@ error: if (out) free (out); return NULL; } + +char * +do_xfs_admin (const char *device, + int extunwritten, int imgfile, int v2log, + int printlabel, int projid32bit, int printuuid, + int lazycounter, const char *label, const char *uuid) +{ + int r; + char *out = NULL, *err = NULL; + const char *argv[MAX_ARGS]; + size_t i = 0; + + ADD_ARG (argv, i, "xfs_admin"); + + /* Optional arguments */ + if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_EXTUNWRITTEN_BITMASK)) + extunwritten = 0; + if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_IMGFILE_BITMASK)) + imgfile = 0; + if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_V2LOG_BITMASK)) + v2log = 0; + if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_PRINTLABEL_BITMASK)) + printlabel = 0; + if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_PRINTUUID_BITMASK)) + printuuid = 0; + if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_PROJID32BIT_BITMASK)) + projid32bit = 0; + + if (extunwritten) + ADD_ARG (argv, i, "-e"); + if (imgfile) + ADD_ARG (argv, i, "-f"); + if (v2log) + ADD_ARG (argv, i, "-j"); + if (printlabel) + ADD_ARG (argv, i, "-l"); + if (printuuid) + ADD_ARG (argv, i, "-u"); + if (projid32bit) + ADD_ARG (argv, i, "-p"); + + if (optargs_bitmask & GUESTFS_XFS_ADMIN_LAZYCOUNTER_BITMASK) { + if (lazycounter) { + ADD_ARG (argv, i, "-c"); + ADD_ARG (argv, i, "1"); + } else { + ADD_ARG (argv, i, "-c"); + ADD_ARG (argv, i, "0"); + } + } + + if (optargs_bitmask & GUESTFS_XFS_ADMIN_LABEL_BITMASK) { + ADD_ARG (argv, i, "-L"); + ADD_ARG (argv, i, label); + } + + if (optargs_bitmask & GUESTFS_XFS_ADMIN_UUID_BITMASK) { + ADD_ARG (argv, i, "-U"); + ADD_ARG (argv, i, uuid); + } + + ADD_ARG (argv, i, device); + ADD_ARG (argv, i, NULL); + + r = commandv (&out, &err, argv); + if (r == -1) { + reply_with_error ("%s: %s", device, err); + goto error; + } + + free (err); + return out; + +error: + if (err) free (err); + if (out) free (out); + return NULL; +} diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index d45558d..5173503 100644 --- a/generator/generator_actions.ml +++ b/generator/generator_actions.ml @@ -9432,6 +9432,27 @@ empty files in the directory C<dir> with names C<00000000> through C<nr-1> (ie. each file name is 8 digits long padded with zeroes)." }; + { defaults with + name = "xfs_admin"; + style = RString "info", [Device "device"], [OBool "extunwritten"; OBool "imgfile"; OBool "v2log"; OBool "printlabel"; OBool "projid32bit"; OBool "printuuid"; OBool "lazycounter"; OString "label"; OString "uuid"]; + proc_nr = Some 349; + optional = Some "xfs"; + tests = [ + InitEmpty, IfAvailable "xfs", TestOutputStruct ( + [["part_disk"; "/dev/sda"; "mbr"]; + ["mkfs"; "xfs"; "/dev/sda1"; ""; "NOARG"; ""; ""]; + ["xfs_admin"; "/dev/sda1"; ""; ""; ""; ""; ""; ""; "false"; ""; ""]; + ["mount"; "/dev/sda1"; "/"]; + ["xfs_info"; "/"]], + [CompareWithInt ("xfs_lazycount", 0); + ]) + ]; + shortdesc = "change parameters of an XFS filesystem"; + longdesc = "\ +Devices that are mounted cannot be modified. Administrators must unmount +filesystems before C<xfs_admin> can convert parameters. A number of parameters +of a mounted filesystem can be examined and modified using the C<xfs_growfs>." }; + ] (* Non-API meta-commands available only in guestfish. diff --git a/gobject/Makefile.inc b/gobject/Makefile.inc index 49f9538..9f81cd2 100644 --- a/gobject/Makefile.inc +++ b/gobject/Makefile.inc @@ -72,7 +72,8 @@ guestfs_gobject_headers= \ include/guestfs-gobject/optargs-xfs_growfs.h \ include/guestfs-gobject/optargs-rsync.h \ include/guestfs-gobject/optargs-rsync_in.h \ - include/guestfs-gobject/optargs-rsync_out.h + include/guestfs-gobject/optargs-rsync_out.h \ + include/guestfs-gobject/optargs-xfs_admin.h guestfs_gobject_sources= \ src/session.c \ @@ -126,4 +127,5 @@ guestfs_gobject_sources= \ src/optargs-xfs_growfs.c \ src/optargs-rsync.c \ src/optargs-rsync_in.c \ - src/optargs-rsync_out.c + src/optargs-rsync_out.c \ + src/optargs-xfs_admin.c diff --git a/guestfs-release-notes.txt b/guestfs-release-notes.txt index 8fe0103..3c7d02b 100644 --- a/guestfs-release-notes.txt +++ b/guestfs-release-notes.txt @@ -89,6 +89,7 @@ RELEASE NOTES FOR LIBGUESTFS 1.20 For further information, see https://bugzilla.redhat.com/show_bug.cgi?id=788642 + <https://bugzilla.redhat.com/show_bug.cgi?id=788642> New APIs diff --git a/po/POTFILES b/po/POTFILES index 60887dc..d961ac1 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -167,6 +167,7 @@ gobject/src/optargs-tar_out.c gobject/src/optargs-tune2fs.c gobject/src/optargs-umount.c gobject/src/optargs-umount_local.c +gobject/src/optargs-xfs_admin.c gobject/src/optargs-xfs_growfs.c gobject/src/session.c gobject/src/struct-application.c diff --git a/src/MAX_PROC_NR b/src/MAX_PROC_NR index 71627d7..aef2e27 100644 --- a/src/MAX_PROC_NR +++ b/src/MAX_PROC_NR @@ -1 +1 @@ -348 +349 -- 1.7.12
On Mon, Aug 20, 2012 at 03:51:54PM +0800, Wanlong Gao wrote:
Add new api xfs_admin to change parameters of an XFS filesystem.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
I've just realized that I forgot about the virt-diff patch that you sent two weeks ago. Can you resend that, rebased?
daemon/xfs.c | 78 ++++++++++++++++++++++++++++++++++++++++++ generator/generator_actions.ml | 21 ++++++++++++ gobject/Makefile.inc | 6 ++-- guestfs-release-notes.txt | 1 + po/POTFILES | 1 + src/MAX_PROC_NR | 2 +- 6 files changed, 106 insertions(+), 3 deletions(-)
diff --git a/daemon/xfs.c b/daemon/xfs.c index b331b9b..b32d256 100644 --- a/daemon/xfs.c +++ b/daemon/xfs.c @@ -460,3 +460,81 @@ error: if (out) free (out); return NULL; } + +char * +do_xfs_admin (const char *device, + int extunwritten, int imgfile, int v2log, + int printlabel, int projid32bit, int printuuid, + int lazycounter, const char *label, const char *uuid) +{ + int r; + char *out = NULL, *err = NULL; + const char *argv[MAX_ARGS]; + size_t i = 0; + + ADD_ARG (argv, i, "xfs_admin"); + + /* Optional arguments */ + if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_EXTUNWRITTEN_BITMASK)) + extunwritten = 0; + if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_IMGFILE_BITMASK)) + imgfile = 0; + if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_V2LOG_BITMASK)) + v2log = 0; + if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_PRINTLABEL_BITMASK)) + printlabel = 0; + if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_PRINTUUID_BITMASK)) + printuuid = 0; + if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_PROJID32BIT_BITMASK)) + projid32bit = 0; + + if (extunwritten) + ADD_ARG (argv, i, "-e"); + if (imgfile) + ADD_ARG (argv, i, "-f"); + if (v2log) + ADD_ARG (argv, i, "-j"); + if (printlabel) + ADD_ARG (argv, i, "-l"); + if (printuuid) + ADD_ARG (argv, i, "-u"); + if (projid32bit) + ADD_ARG (argv, i, "-p"); + + if (optargs_bitmask & GUESTFS_XFS_ADMIN_LAZYCOUNTER_BITMASK) { + if (lazycounter) { + ADD_ARG (argv, i, "-c"); + ADD_ARG (argv, i, "1"); + } else { + ADD_ARG (argv, i, "-c"); + ADD_ARG (argv, i, "0"); + } + } + + if (optargs_bitmask & GUESTFS_XFS_ADMIN_LABEL_BITMASK) { + ADD_ARG (argv, i, "-L"); + ADD_ARG (argv, i, label); + } + + if (optargs_bitmask & GUESTFS_XFS_ADMIN_UUID_BITMASK) { + ADD_ARG (argv, i, "-U"); + ADD_ARG (argv, i, uuid); + } + + ADD_ARG (argv, i, device); + ADD_ARG (argv, i, NULL); + + r = commandv (&out, &err, argv); + if (r == -1) { + reply_with_error ("%s: %s", device, err); + goto error; + } + + free (err); + return out;
What is the output of the xfs_admin command? I don't think we should return unstructured strings, so either this output should be parsed if it contains useful information, or it should be dropped.
+error: + if (err) free (err); + if (out) free (out); + return NULL; +} diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index d45558d..5173503 100644 --- a/generator/generator_actions.ml +++ b/generator/generator_actions.ml @@ -9432,6 +9432,27 @@ empty files in the directory C<dir> with names C<00000000> through C<nr-1> (ie. each file name is 8 digits long padded with zeroes)." };
+ { defaults with + name = "xfs_admin"; + style = RString "info", [Device "device"], [OBool "extunwritten"; OBool "imgfile"; OBool "v2log"; OBool "printlabel"; OBool "projid32bit"; OBool "printuuid"; OBool "lazycounter"; OString "label"; OString "uuid"];
As above, either the output should be parsed, or this function should return RErr.
+ proc_nr = Some 349; + optional = Some "xfs"; + tests = [ + InitEmpty, IfAvailable "xfs", TestOutputStruct ( + [["part_disk"; "/dev/sda"; "mbr"]; + ["mkfs"; "xfs"; "/dev/sda1"; ""; "NOARG"; ""; ""]; + ["xfs_admin"; "/dev/sda1"; ""; ""; ""; ""; ""; ""; "false"; ""; ""]; + ["mount"; "/dev/sda1"; "/"]; + ["xfs_info"; "/"]], + [CompareWithInt ("xfs_lazycount", 0); + ]) + ]; + shortdesc = "change parameters of an XFS filesystem"; + longdesc = "\ +Devices that are mounted cannot be modified. Administrators must unmount +filesystems before C<xfs_admin> can convert parameters. A number of parameters +of a mounted filesystem can be examined and modified using the C<xfs_growfs>." }; + ]
(* Non-API meta-commands available only in guestfish. diff --git a/gobject/Makefile.inc b/gobject/Makefile.inc index 49f9538..9f81cd2 100644 --- a/gobject/Makefile.inc +++ b/gobject/Makefile.inc @@ -72,7 +72,8 @@ guestfs_gobject_headers= \ include/guestfs-gobject/optargs-xfs_growfs.h \ include/guestfs-gobject/optargs-rsync.h \ include/guestfs-gobject/optargs-rsync_in.h \ - include/guestfs-gobject/optargs-rsync_out.h + include/guestfs-gobject/optargs-rsync_out.h \ + include/guestfs-gobject/optargs-xfs_admin.h
guestfs_gobject_sources= \ src/session.c \ @@ -126,4 +127,5 @@ guestfs_gobject_sources= \ src/optargs-xfs_growfs.c \ src/optargs-rsync.c \ src/optargs-rsync_in.c \ - src/optargs-rsync_out.c + src/optargs-rsync_out.c \ + src/optargs-xfs_admin.c diff --git a/guestfs-release-notes.txt b/guestfs-release-notes.txt index 8fe0103..3c7d02b 100644 --- a/guestfs-release-notes.txt +++ b/guestfs-release-notes.txt @@ -89,6 +89,7 @@ RELEASE NOTES FOR LIBGUESTFS 1.20
For further information, see https://bugzilla.redhat.com/show_bug.cgi?id=788642 + <https://bugzilla.redhat.com/show_bug.cgi?id=788642>
New APIs
diff --git a/po/POTFILES b/po/POTFILES index 60887dc..d961ac1 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -167,6 +167,7 @@ gobject/src/optargs-tar_out.c gobject/src/optargs-tune2fs.c gobject/src/optargs-umount.c gobject/src/optargs-umount_local.c +gobject/src/optargs-xfs_admin.c gobject/src/optargs-xfs_growfs.c gobject/src/session.c gobject/src/struct-application.c diff --git a/src/MAX_PROC_NR b/src/MAX_PROC_NR index 71627d7..aef2e27 100644 --- a/src/MAX_PROC_NR +++ b/src/MAX_PROC_NR @@ -1 +1 @@ -348 +349 -- 1.7.12
The API looks fine, but I don't like the fact that it returns an unstructured string. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
On 08/20/2012 04:00 PM, Richard W.M. Jones wrote:
On Mon, Aug 20, 2012 at 03:51:54PM +0800, Wanlong Gao wrote:
Add new api xfs_admin to change parameters of an XFS filesystem.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
I've just realized that I forgot about the virt-diff patch that you sent two weeks ago. Can you resend that, rebased?
Yes, I'll resend. ;)
daemon/xfs.c | 78 ++++++++++++++++++++++++++++++++++++++++++ generator/generator_actions.ml | 21 ++++++++++++
...
What is the output of the xfs_admin command? I don't think we should return unstructured strings, so either this output should be parsed if it contains useful information, or it should be dropped.
OK, I'd like to drop it because the useful info can always be fetched from xfs_info. Thanks, Wanlong Gao
Add new api xfs_admin to change parameters of an XFS filesystem. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> --- daemon/xfs.c | 77 ++++++++++++++++++++++++++++++++++++++++++ generator/generator_actions.ml | 21 ++++++++++++ gobject/Makefile.inc | 6 ++-- guestfs-release-notes.txt | 1 + po/POTFILES | 1 + src/MAX_PROC_NR | 2 +- 6 files changed, 105 insertions(+), 3 deletions(-) diff --git a/daemon/xfs.c b/daemon/xfs.c index b331b9b..df01917 100644 --- a/daemon/xfs.c +++ b/daemon/xfs.c @@ -460,3 +460,80 @@ error: if (out) free (out); return NULL; } + +int +do_xfs_admin (const char *device, + int extunwritten, int imgfile, int v2log, + int printlabel, int projid32bit, int printuuid, + int lazycounter, const char *label, const char *uuid) +{ + int r; + char *err = NULL; + const char *argv[MAX_ARGS]; + size_t i = 0; + + ADD_ARG (argv, i, "xfs_admin"); + + /* Optional arguments */ + if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_EXTUNWRITTEN_BITMASK)) + extunwritten = 0; + if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_IMGFILE_BITMASK)) + imgfile = 0; + if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_V2LOG_BITMASK)) + v2log = 0; + if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_PRINTLABEL_BITMASK)) + printlabel = 0; + if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_PRINTUUID_BITMASK)) + printuuid = 0; + if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_PROJID32BIT_BITMASK)) + projid32bit = 0; + + if (extunwritten) + ADD_ARG (argv, i, "-e"); + if (imgfile) + ADD_ARG (argv, i, "-f"); + if (v2log) + ADD_ARG (argv, i, "-j"); + if (printlabel) + ADD_ARG (argv, i, "-l"); + if (printuuid) + ADD_ARG (argv, i, "-u"); + if (projid32bit) + ADD_ARG (argv, i, "-p"); + + if (optargs_bitmask & GUESTFS_XFS_ADMIN_LAZYCOUNTER_BITMASK) { + if (lazycounter) { + ADD_ARG (argv, i, "-c"); + ADD_ARG (argv, i, "1"); + } else { + ADD_ARG (argv, i, "-c"); + ADD_ARG (argv, i, "0"); + } + } + + if (optargs_bitmask & GUESTFS_XFS_ADMIN_LABEL_BITMASK) { + ADD_ARG (argv, i, "-L"); + ADD_ARG (argv, i, label); + } + + if (optargs_bitmask & GUESTFS_XFS_ADMIN_UUID_BITMASK) { + ADD_ARG (argv, i, "-U"); + ADD_ARG (argv, i, uuid); + } + + ADD_ARG (argv, i, device); + ADD_ARG (argv, i, NULL); + + r = commandv (NULL, &err, argv); + if (r == -1) { + reply_with_error ("%s: %s", device, err); + goto error; + } + + free (err); + return 0; + +error: + free (err); + return -1; +} diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index d45558d..ebda464 100644 --- a/generator/generator_actions.ml +++ b/generator/generator_actions.ml @@ -9432,6 +9432,27 @@ empty files in the directory C<dir> with names C<00000000> through C<nr-1> (ie. each file name is 8 digits long padded with zeroes)." }; + { defaults with + name = "xfs_admin"; + style = RErr, [Device "device"], [OBool "extunwritten"; OBool "imgfile"; OBool "v2log"; OBool "printlabel"; OBool "projid32bit"; OBool "printuuid"; OBool "lazycounter"; OString "label"; OString "uuid"]; + proc_nr = Some 349; + optional = Some "xfs"; + tests = [ + InitEmpty, IfAvailable "xfs", TestOutputStruct ( + [["part_disk"; "/dev/sda"; "mbr"]; + ["mkfs"; "xfs"; "/dev/sda1"; ""; "NOARG"; ""; ""]; + ["xfs_admin"; "/dev/sda1"; ""; ""; ""; ""; ""; ""; "false"; ""; ""]; + ["mount"; "/dev/sda1"; "/"]; + ["xfs_info"; "/"]], + [CompareWithInt ("xfs_lazycount", 0); + ]) + ]; + shortdesc = "change parameters of an XFS filesystem"; + longdesc = "\ +Devices that are mounted cannot be modified. Administrators must unmount +filesystems before C<xfs_admin> can convert parameters. A number of parameters +of a mounted filesystem can be examined and modified using the C<xfs_growfs>." }; + ] (* Non-API meta-commands available only in guestfish. diff --git a/gobject/Makefile.inc b/gobject/Makefile.inc index 49f9538..9f81cd2 100644 --- a/gobject/Makefile.inc +++ b/gobject/Makefile.inc @@ -72,7 +72,8 @@ guestfs_gobject_headers= \ include/guestfs-gobject/optargs-xfs_growfs.h \ include/guestfs-gobject/optargs-rsync.h \ include/guestfs-gobject/optargs-rsync_in.h \ - include/guestfs-gobject/optargs-rsync_out.h + include/guestfs-gobject/optargs-rsync_out.h \ + include/guestfs-gobject/optargs-xfs_admin.h guestfs_gobject_sources= \ src/session.c \ @@ -126,4 +127,5 @@ guestfs_gobject_sources= \ src/optargs-xfs_growfs.c \ src/optargs-rsync.c \ src/optargs-rsync_in.c \ - src/optargs-rsync_out.c + src/optargs-rsync_out.c \ + src/optargs-xfs_admin.c diff --git a/guestfs-release-notes.txt b/guestfs-release-notes.txt index 8fe0103..3c7d02b 100644 --- a/guestfs-release-notes.txt +++ b/guestfs-release-notes.txt @@ -89,6 +89,7 @@ RELEASE NOTES FOR LIBGUESTFS 1.20 For further information, see https://bugzilla.redhat.com/show_bug.cgi?id=788642 + <https://bugzilla.redhat.com/show_bug.cgi?id=788642> New APIs diff --git a/po/POTFILES b/po/POTFILES index 60887dc..d961ac1 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -167,6 +167,7 @@ gobject/src/optargs-tar_out.c gobject/src/optargs-tune2fs.c gobject/src/optargs-umount.c gobject/src/optargs-umount_local.c +gobject/src/optargs-xfs_admin.c gobject/src/optargs-xfs_growfs.c gobject/src/session.c gobject/src/struct-application.c diff --git a/src/MAX_PROC_NR b/src/MAX_PROC_NR index 71627d7..aef2e27 100644 --- a/src/MAX_PROC_NR +++ b/src/MAX_PROC_NR @@ -1 +1 @@ -348 +349 -- 1.7.12
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> --- daemon/xfs.c | 13 ++++++------- generator/generator_actions.ml | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/daemon/xfs.c b/daemon/xfs.c index df01917..12ed600 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 ebda464..562f785 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 = [ -- 1.7.12
On Mon, Aug 20, 2012 at 04:17:01PM +0800, Wanlong Gao wrote:
Just drop the unstructed output since we can get the structed info from xfs_info instead.
OK. I will push it later today. NB: This change is only acceptable because this API hasn't appeared in a stable version of libguestfs yet (otherwise it would break the guarantee of a stable ABI). Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
On 08/20/2012 04:23 PM, Richard W.M. Jones wrote:
On Mon, Aug 20, 2012 at 04:17:01PM +0800, Wanlong Gao wrote:
Just drop the unstructed output since we can get the structed info from xfs_info instead.
OK. I will push it later today.
NB: This change is only acceptable because this API hasn't appeared in a stable version of libguestfs yet (otherwise it would break the guarantee of a stable ABI).
Yes, I see. thank you. Wanlong Gao
Rich.
This looks fine. I will push it later today, thanks. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v
participants (2)
-
Richard W.M. Jones -
Wanlong Gao