Re: [Libguestfs] [PATCH v3 7/7] resize: add support to resize logical partitions

2014-09-23 Thread Richard W.M. Jones
On Tue, Sep 23, 2014 at 01:37:10PM +0800, Hu Tao wrote:
 On Mon, Sep 22, 2014 at 04:58:44PM +0100, Richard W.M. Jones wrote:
  
  I'm going to have to test the heck out of patch 07 to really
  understand what it is doing and whether it works.  Our current
  virt-resize test suite isn't really up to the job.
 
 Is the virt-resize test suite public available? Maybe I can contrib
 patches to it.

The only tests we run on virt-resize are the ones in the resize/
subdirectory of libguestfs git.  See TESTS = in resize/Makefile.am.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] [PATCH] inspect: basic Minix support

2014-09-23 Thread Richard W.M. Jones
On Mon, Sep 22, 2014 at 08:16:13PM +0200, Pino Toscano wrote:
 Add a basic support for identifying Minix, extracting its version and
 hostname.
 
 Related to RHBZ#1144137.

ACK.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] [PATCH v3 7/7] resize: add support to resize logical partitions

2014-09-23 Thread Hu Tao
On Tue, Sep 23, 2014 at 08:39:33AM +0100, Richard W.M. Jones wrote:
 On Tue, Sep 23, 2014 at 01:37:10PM +0800, Hu Tao wrote:
  On Mon, Sep 22, 2014 at 04:58:44PM +0100, Richard W.M. Jones wrote:
   
   I'm going to have to test the heck out of patch 07 to really
   understand what it is doing and whether it works.  Our current
   virt-resize test suite isn't really up to the job.
  
  Is the virt-resize test suite public available? Maybe I can contrib
  patches to it.
 
 The only tests we run on virt-resize are the ones in the resize/
 subdirectory of libguestfs git.  See TESTS = in resize/Makefile.am.

Thanks, I'll take a look at it.

Regards,
Hu

 
 Rich.
 
 -- 
 Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
 Read my programming and virtualization blog: http://rwmj.wordpress.com
 libguestfs lets you edit virtual machines.  Supports shell scripting,
 bindings from many languages.  http://libguestfs.org

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


[Libguestfs] [PATCH] inspect: map Hurd devices, and enable fstab introspection

2014-09-23 Thread Pino Toscano
Add a mapping for the Hurd device names, so it is possible to enable the
inspection of /etc/fstab.
---
 src/inspect-fs-unix.c | 25 -
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c
index 3f57cd5..b629508 100644
--- a/src/inspect-fs-unix.c
+++ b/src/inspect-fs-unix.c
@@ -78,6 +78,7 @@ static pcre *re_opensuse_version;
 static pcre *re_sles_version;
 static pcre *re_sles_patchlevel;
 static pcre *re_minix;
+static pcre *re_hurd_dev;
 
 static void compile_regexps (void) __attribute__((constructor));
 static void free_regexps (void) __attribute__((destructor));
@@ -137,6 +138,7 @@ compile_regexps (void)
   COMPILE (re_sles_version, ^VERSION = (\\d+), 0);
   COMPILE (re_sles_patchlevel, ^PATCHLEVEL = (\\d+), 0);
   COMPILE (re_minix, ^(\\d+)\\.(\\d+)(\\.(\\d+))?, 0);
+  COMPILE (re_hurd_dev, ^/dev/(h)d(\\d+)s(\\d+)$, 0);
 }
 
 static void
@@ -170,6 +172,7 @@ free_regexps (void)
   pcre_free (re_sles_version);
   pcre_free (re_sles_patchlevel);
   pcre_free (re_minix);
+  pcre_free (re_hurd_dev);
 }
 
 static void check_architecture (guestfs_h *g, struct inspect_fs *fs);
@@ -776,7 +779,11 @@ guestfs___check_hurd_root (guestfs_h *g, struct inspect_fs 
*fs)
   /* Determine the architecture. */
   check_architecture (g, fs);
 
-  /* XXX Check for /etc/fstab. */
+  if (guestfs_is_file (g, /etc/fstab)  0) {
+const char *configfiles[] = { /etc/fstab, NULL };
+if (inspect_with_augeas (g, fs, configfiles, check_fstab) == -1)
+  return -1;
+  }
 
   /* Determine hostname. */
   if (check_hostname_unix (g, fs) == -1)
@@ -1635,6 +1642,22 @@ resolve_fstab_device (guestfs_h *g, const char *spec, 
Hash_table *md_map)
 if (r == -1)
   return NULL;
   }
+  else if (match3 (g, spec, re_hurd_dev, type, disk, part)) {
+/* Hurd disk devices are like /dev/hdNsM, where hdN is the
+ * N-th disk and M is the M-th partition on that disk.
+ * Turn the disk number into a letter-based identifier, so
+ * we can resolve it easily.
+ */
+int disk_i = guestfs___parse_unsigned_int (g, disk);
+char disk_as_letter[2] = { 0 };
+disk_as_letter[0] = disk_i + 'a';
+r = resolve_fstab_device_xdev (g, type, disk_as_letter, part, device);
+free (type);
+free (disk);
+free (part);
+if (r == -1)
+  return NULL;
+  }
 
   /* Didn't match device pattern, return original spec unchanged. */
   if (device == NULL)
-- 
1.9.3

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


[Libguestfs] [PATCH 00/13] syntax-check

2014-09-23 Thread Hu Tao
Hi Rich,

This series includes patches to make `make syntax-check` pass.

Some of the fix require change to maint.mk, but the file is not in git
repo. Is it intended?

Thanks!

Hu Tao (13):
  syntax-check: dirty hack to pass bindtextdomain check
  syntax-check: fix error_message_period check
  syntax-check: fix makefile_at_at_check
  syntax-check: fix prohibit_assert_without_use check
  syntax-check: fix prohibit_c_ctype_without_use check
  syntax-check: fix prohibit_dirent_without_use check
  syntax-check: fix prohibit_empty_lines_at_EOF check
  syntax-check: fix prohibit_getopt_without_use check
  syntax-check: fix prohibit_path_max_allocation check
  syntax-check: fix prohibit_test_minus_ao check
  syntax-check: fix prohibit_undesirable_word_seq check
  syntax-check: fix require_config_h_first check
  syntax-check: fix trailing_blank check

 BUGS |   6 +-
 align/Makefile.am|   2 +-
 align/test-virt-alignment-scan-guests.sh |   2 +-
 align/test-virt-alignment-scan.sh|   2 +-
 builder/Makefile.am  |   2 +-
 builder/test-virt-builder-planner.sh |   2 +-
 builder/website/Makefile.am  |   2 +-
 builder/website/debian.preseed   |   2 +-
 builder/website/index| 120 +++
 builder/website/index.asc| 120 +++
 builder/website/ubuntu.preseed   |   1 -
 builder/website/ubuntu.sh|   2 +-
 cat/Makefile.am  |   4 +-
 cat/cat.c|   2 -
 cat/log.c|   2 -
 common-rules.mk  |   8 +-
 configure.ac |   2 +-
 customize/Makefile.am|   2 +-
 customize/customize_run.mli  |   2 +-
 daemon/inotify.c |  12 +-
 daemon/mount.c   |   2 +-
 df/Makefile.am   |   4 +-
 diff/Makefile.am |   2 +-
 edit/edit.c  |   1 -
 erlang/examples/Makefile.am  |   4 +-
 examples/Makefile.am |  16 +-
 fish/Makefile.am |   2 +-
 fish/test-file-attrs.sh  |  10 +-
 fish/test-mount-local.sh |   2 +-
 format/Makefile.am   |   2 +-
 generator/c.ml   |   2 +-
 golang/examples/Makefile.am  |   4 +-
 guestfs-release-notes.pod|   8 +-
 guestfs-release-notes.txt| 529 +++
 inspector/Makefile.am|   4 +-
 java/examples/Makefile.am|   4 +-
 lua/Makefile.am  |   2 +-
 lua/examples/Makefile.am |   4 +-
 make-fs/Makefile.am  |   2 +-
 make-fs/test-virt-make-fs.sh |   2 +-
 mllib/Makefile.am|   2 +-
 ocaml/Makefile.am|   2 +-
 ocaml/examples/Makefile.am   |   4 +-
 p2v/config.c |   1 -
 p2v/conversion.c |   1 -
 p2v/gui.c|   3 +-
 p2v/issue|   1 -
 p2v/main.c   |   1 -
 perl/examples/Makefile.am|   4 +-
 po-docs/ja.po|   8 +-
 po-docs/libguestfs-docs.pot  |   8 +-
 po-docs/uk.po|   8 +-
 podwrapper.pl.in |   6 +-
 python/examples/Makefile.am  |   4 +-
 python/guestfs-py-byhand.c   |   4 +-
 rescue/Makefile.am   |   2 +-
 resize/Makefile.am   |   2 +-
 resize/resize.ml |  10 +-
 ruby/examples/Makefile.am|   4 +-
 sparsify/Makefile.am |   2 +-
 sparsify/copying.ml  |   2 +-
 src/Makefile.am  |   2 +-
 src/api-support/update-from-tarballs.sh  |   2 +-
 src/appliance.c  |   1 -
 src/fuse.c   |   2 +-
 src/launch-libvirt.c |   4 +-
 src/libvirt-domain.c |   2 +-
 sysprep/Makefile.am  |   4 +-
 sysprep/test-virt-sysprep-script.sh  |   2 +-
 test-tool/Makefile.am|   2 +-
 tests/c-api/Makefile.am  |   2 +-
 tests/fuzz/Makefile.am   |   2 +-
 tests/guests/guest-aux/debian-packages   |   1 -
 tests/mount-local/Makefile.am|   2 +-
 tests/parallel/Makefile.am   |   2 +-
 tests/qemu/qemu-snapshot-isolation.sh|   2 +-
 tests/regressions/rhbz563450.sh  |   2 +-
 tests/relative-paths/Makefile.am |   2 +-
 tools/virt-win-reg   |   2 +-
 v2v/Makefile.am  |   2 +-
 v2v/convert_linux.ml 

[Libguestfs] [PATCH 04/13] syntax-check: fix prohibit_assert_without_use check

2014-09-23 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com
---
 p2v/config.c | 1 -
 p2v/conversion.c | 1 -
 p2v/main.c   | 1 -
 3 files changed, 3 deletions(-)

diff --git a/p2v/config.c b/p2v/config.c
index b4abb40..abc91be 100644
--- a/p2v/config.c
+++ b/p2v/config.c
@@ -24,7 +24,6 @@
 #include inttypes.h
 #include unistd.h
 #include errno.h
-#include assert.h
 #include locale.h
 #include libintl.h
 
diff --git a/p2v/conversion.c b/p2v/conversion.c
index 8e6aa6c..ced9026 100644
--- a/p2v/conversion.c
+++ b/p2v/conversion.c
@@ -28,7 +28,6 @@
 #include time.h
 #include errno.h
 #include locale.h
-#include assert.h
 #include libintl.h
 #include sys/types.h
 #include sys/wait.h
diff --git a/p2v/main.c b/p2v/main.c
index 75a18c3..9c34413c 100644
--- a/p2v/main.c
+++ b/p2v/main.c
@@ -28,7 +28,6 @@
 #include errno.h
 #include dirent.h
 #include locale.h
-#include assert.h
 #include libintl.h
 #include sys/types.h
 #include sys/stat.h
-- 
1.9.3

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


[Libguestfs] [PATCH 05/13] syntax-check: fix prohibit_c_ctype_without_use check

2014-09-23 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com
---
 cat/cat.c   | 2 --
 cat/log.c   | 2 --
 edit/edit.c | 1 -
 3 files changed, 5 deletions(-)

diff --git a/cat/cat.c b/cat/cat.c
index 211d6e3..ec9c81f 100644
--- a/cat/cat.c
+++ b/cat/cat.c
@@ -29,8 +29,6 @@
 #include assert.h
 #include libintl.h
 
-#include c-ctype.h
-
 #include guestfs.h
 #include options.h
 #include windows.h
diff --git a/cat/log.c b/cat/log.c
index bb3305f..0d8dab0 100644
--- a/cat/log.c
+++ b/cat/log.c
@@ -34,8 +34,6 @@
 #include sys/types.h
 #include sys/wait.h
 
-#include c-ctype.h
-
 #include guestfs.h
 #include options.h
 
diff --git a/edit/edit.c b/edit/edit.c
index 7996020..20b2963 100644
--- a/edit/edit.c
+++ b/edit/edit.c
@@ -33,7 +33,6 @@
 #include utime.h
 
 #include xvasprintf.h
-#include c-ctype.h
 
 #include guestfs.h
 #include options.h
-- 
1.9.3

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


[Libguestfs] [PATCH 08/13] syntax-check: fix prohibit_getopt_without_use check

2014-09-23 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com
---
 p2v/gui.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/p2v/gui.c b/p2v/gui.c
index 2df5017..dc6619a 100644
--- a/p2v/gui.c
+++ b/p2v/gui.c
@@ -23,7 +23,6 @@
 #include string.h
 #include inttypes.h
 #include unistd.h
-#include getopt.h
 #include fcntl.h
 #include errno.h
 #include locale.h
-- 
1.9.3

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


[Libguestfs] [PATCH 11/13] syntax-check: fix prohibit_undesirable_word_seq check

2014-09-23 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com
---
 BUGS| 6 +++---
 guestfs-release-notes.pod   | 8 
 guestfs-release-notes.txt   | 8 
 po-docs/ja.po   | 8 
 po-docs/libguestfs-docs.pot | 8 
 po-docs/uk.po   | 8 
 6 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/BUGS b/BUGS
index 0a5a151..8a4d76f 100644
--- a/BUGS
+++ b/BUGS
@@ -306,10 +306,10 @@ Bugs in NEW or ASSIGNED state are open and waiting for 
someone to fix.
   virt-builder gives GPG warning message
 
 1100138 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1100138
-  some operation cause lvremove can not find the object
+  some operation cause lvremove cannot find the object
 
 1100140 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1100140
-  some operation cause lvremove can not find the object
+  some operation cause lvremove cannot find the object
 
 1100528 NEW https://bugzilla.redhat.com/show_bug.cgi?id=1100528
   These APIs also need to add to `guestfish -h` command list
@@ -513,7 +513,7 @@ You can help by testing the fixes.
   Disable libguestfs UML backend mode in RHEL7
 
 1144201 ON_QA https://bugzilla.redhat.com/show_bug.cgi?id=1144201
-  guestfish can not restore terminal's output colour when exit guestfish, if 
the terminal's background colour is black then it will make a inconvenient
+  guestfish cannot restore terminal's output colour when exit guestfish, if 
the terminal's background colour is black then it will make a inconvenient
 
 (22 bugs)
 
diff --git a/guestfs-release-notes.pod b/guestfs-release-notes.pod
index a956c87..02c293c 100644
--- a/guestfs-release-notes.pod
+++ b/guestfs-release-notes.pod
@@ -2199,7 +2199,7 @@ the git repository, or the ChangeLog file distributed in 
the tarball.
  - 811650 guestfs_last_error not set when qemu fails early during launch
  - 811649 libguestfs cannot open disk images which are symlinks to files that 
contain ':' (colon) character
  - 87 [RFE][virt-sysprep] net-hwaddr not removed from ifcfg-* files on 
rhel
- - 82 [RFE][virt-sysprep] hostname can not be changed on rhel system
+ - 82 [RFE][virt-sysprep] hostname cannot be changed on rhel system
  - 809361 inspection doesn't recognize Fedora 18 (grub2 + GPT)
  - 807905 mkfs blocksize option breaks when creating btrfs
  - 805070 virt-filesystems should show 'parents' of LV and RAID devices
@@ -3268,7 +3268,7 @@ the git repository, or the ChangeLog file distributed in 
the tarball.
  - 596776 virt-inspector doesn't discover modprobe aliases on RHEL 3 guests
  - 596763 Updates to Spanish translation
  - 593292 Updates to Spanish translation
- - 592883 can not edit files on  images mounted with guestmount cmd
+ - 592883 cannot edit files on  images mounted with guestmount cmd
  - 592360 Updates to Spanish translation
  - 591250 virt-tar prints tar_in: tar subcommand failed on directory if the 
archive is compressed or not in the right format
  - 591155 virt-tar prints tar_in: tar subcommand failed on directory if a 
disk image is not writable
@@ -3295,7 +3295,7 @@ the git repository, or the ChangeLog file distributed in 
the tarball.
  - 582899 guestfish:sparse is missed from command autocomplete list
  - 582891 [Feature Request] behavior and return value of guestfish umask cmd 
should be changed
  - 582548 [mknod] umask shouldn't take effect when mode is set explicitly
- - 582484 some guestfish sub commands can not handle special files properly
+ - 582484 some guestfish sub commands cannot handle special files properly
  - 582252 Updates to Spanish translation
  - 581501 Updates to Spanish translation
  - 580650 virt-inspector warns No grub default specified at 
/usr/lib/perl5/Sys/Guestfs/Lib.pm at [...]
@@ -3303,7 +3303,7 @@ the git repository, or the ChangeLog file distributed in 
the tarball.
  - 580246 tar-in command hangs if uploading more than available space
  - 580016 aug-ls in guestfish does not take augeas variable as argument
  - 579664 guestfish doesn't report error when there is not enough space for 
image allocation
- - 579608 multiple commands in guestfish can not work for symbol links
+ - 579608 multiple commands in guestfish cannot work for symbol links
  - 579155 libguestfs hangs if qemu doesn't start (in null vmchannel mode)
  - 578407 the prefix '-' in sub-command isn't handled by guestfish in remote 
control mode
  - 576879 libguestfs protocol loses synchronization if you 'upload' before 
mounting disks
diff --git a/guestfs-release-notes.txt b/guestfs-release-notes.txt
index 3eada81..60c6f14 100644
--- a/guestfs-release-notes.txt
+++ b/guestfs-release-notes.txt
@@ -2069,7 +2069,7 @@ RELEASE NOTES FOR LIBGUESTFS 1.18
  - 811650 guestfs_last_error not set when qemu fails early during launch
  - 811649 libguestfs cannot open disk images which are symlinks to files 
that contain ':' (colon) character
  - 87 [RFE][virt-sysprep] net-hwaddr not removed from ifcfg-* files 
on rhel
- - 82 

[Libguestfs] [PATCH 02/13] syntax-check: fix error_message_period check

2014-09-23 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com
---
 resize/resize.ml | 10 +-
 sparsify/copying.ml  |  2 +-
 src/fuse.c   |  2 +-
 src/launch-libvirt.c |  4 ++--
 src/libvirt-domain.c |  2 +-
 v2v/convert_linux.ml |  6 +++---
 v2v/input_libvirt.ml |  4 ++--
 v2v/lib_ovf.ml   |  2 +-
 v2v/output_glance.ml |  2 +-
 v2v/output_rhev.ml   |  6 +++---
 v2v/v2v.ml   |  6 +++---
 11 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/resize/resize.ml b/resize/resize.ml
index 81bb270..a3ea9be 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@ -310,7 +310,7 @@ read the man page virt-resize(1).
 let infile =
   try (infile, URI.parse_uri infile)
   with Invalid_argument URI.parse_uri -
-error (f_error parsing URI '%s'. Look for error messages printed 
above.)
+error (f_error parsing URI '%s'. Look for error messages printed 
above)
   infile in
 
 infile, outfile, align_first, alignment, copy_boot_loader,
@@ -406,7 +406,7 @@ read the man page virt-resize(1).
 | msdos - MBR, msdos
 | gpt - GPT, gpt
 | _ -
-  error (f_%s: unknown partition table type\nvirt-resize only supports 
MBR (DOS) and GPT partition tables.)
+  error (f_%s: unknown partition table type\nvirt-resize only supports 
MBR (DOS) and GPT partition tables)
 (fst infile) in
 
   (* Build a data structure describing the source disk's partition layout. *)
@@ -767,7 +767,7 @@ read the man page virt-resize(1).
  | None - ()
  | Some dev -
  if surplus  0L then
-   error (f_You cannot use --expand when there is no surplus space to 
expand into.  You need to make the target disk larger by at least %s.)
+   error (f_You cannot use --expand when there is no surplus space to 
expand into.  You need to make the target disk larger by at least %s)
  (human_size (Int64.neg surplus));
 
  let option = --expand in
@@ -779,7 +779,7 @@ read the man page virt-resize(1).
  | None - ()
  | Some dev -
  if surplus  0L then
-   error (f_You cannot use --shrink when there is no deficit (see 
'deficit' in the virt-resize(1) man page).);
+   error (f_You cannot use --shrink when there is no deficit (see 
'deficit' in the virt-resize(1) man page));
 
  let option = --shrink in
  let p = find_partition ~option dev in
@@ -796,7 +796,7 @@ read the man page virt-resize(1).
 
 if surplus  0L then (
   let deficit = Int64.neg surplus in
-  error (f_There is a deficit of %Ld bytes (%s).  You need to make the 
target disk larger by at least this amount or adjust your resizing requests.)
+  error (f_There is a deficit of %Ld bytes (%s).  You need to make the 
target disk larger by at least this amount or adjust your resizing requests)
   deficit (human_size deficit)
 );
 
diff --git a/sparsify/copying.ml b/sparsify/copying.ml
index 3940f1f..a4a82f1 100644
--- a/sparsify/copying.ml
+++ b/sparsify/copying.ml
@@ -67,7 +67,7 @@ let run indisk outdisk check_tmpdir compress convert
 
   (* Compression is not supported by raw output (RHBZ#852194). *)
   if output_format = raw  compress then
-error (f_--compress cannot be used for raw output.  Remove this option or 
use --convert qcow2.);
+error (f_--compress cannot be used for raw output.  Remove this option or 
use --convert qcow2);
 
   (* Use TMPDIR or --tmp parameter? *)
   let tmp_place =
diff --git a/src/fuse.c b/src/fuse.c
index 08a8784..f7a6e71 100644
--- a/src/fuse.c
+++ b/src/fuse.c
@@ -1065,7 +1065,7 @@ guestfs__mount_local_run (guestfs_h *g)
   r = guestfs_exists (g, /);
   guestfs_pop_error_handler (g);
   if (r == -1) {
-error (g, _(you must call 'guestfs_mount' first to mount a filesystem on 
'/'.\nNote: '%s' is still mounted.  Use 'guestunmount %s' to clean up.),
+error (g, _(you must call 'guestfs_mount' first to mount a filesystem on 
'/'.\nNote: '%s' is still mounted.  Use 'guestunmount %s' to clean up),
g-localmountpoint, g-localmountpoint);
 return -1;
   }
diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
index 706ae38..5a3159d 100644
--- a/src/launch-libvirt.c
+++ b/src/launch-libvirt.c
@@ -1404,14 +1404,14 @@ construct_libvirt_xml_disk (guestfs_h *g,
 if (STREQ (format, unknown)) {
   error (g, _(could not auto-detect the format.\n
   If the format is known, pass the format to libguestfs, 
eg. using the\n
-  '--format' option, or via the optional 'format' 
argument to 'add-drive'.));
+  '--format' option, or via the optional 'format' 
argument to 'add-drive'));
   return -1;
 }
   }
   else {
 error (g, _(could not auto-detect the format when using a non-file 
protocol.\n
 If the format is known, pass the format to libguestfs, 
eg. using the\n
-'--format' option, or via the optional 'format' argument 
to 

[Libguestfs] [PATCH 06/13] syntax-check: fix prohibit_dirent_without_use check

2014-09-23 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com
---
 src/appliance.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/appliance.c b/src/appliance.c
index a3a083e..d7aa6b1 100644
--- a/src/appliance.c
+++ b/src/appliance.c
@@ -19,7 +19,6 @@
 #include config.h
 
 #include errno.h
-#include dirent.h
 #include stdio.h
 #include stdlib.h
 #include stdarg.h
-- 
1.9.3

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


[Libguestfs] [PATCH 01/13] syntax-check: dirty hack to pass bindtextdomain check

2014-09-23 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com
---
 p2v/gui.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/p2v/gui.c b/p2v/gui.c
index a50307d..2df5017 100644
--- a/p2v/gui.c
+++ b/p2v/gui.c
@@ -69,7 +69,7 @@ static GtkWidget *run_dlg,
   *cancel_button;
 
 /* The entry point from the main program.
- * Note that gtk_init etc have already been called in main().
+ * Note that gtk_init etc have already been called in main_().
  */
 void
 gui_application (struct config *config)
-- 
1.9.3

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


[Libguestfs] [PATCH 13/13] syntax-check: fix trailing_blank check

2014-09-23 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com
---
 builder/website/debian.preseed |   2 +-
 builder/website/index  | 120 +-
 builder/website/index.asc  | 120 +-
 customize/customize_run.mli|   2 +-
 daemon/mount.c |   2 +-
 fish/test-file-attrs.sh|  10 +-
 generator/c.ml |   2 +-
 guestfs-release-notes.txt  | 520 -
 podwrapper.pl.in   |   6 +-
 tools/virt-win-reg |   2 +-
 v2v/test-v2v-print-source.sh   |   4 +-
 11 files changed, 395 insertions(+), 395 deletions(-)

diff --git a/builder/website/debian.preseed b/builder/website/debian.preseed
index faa4430..d3158a5 100644
--- a/builder/website/debian.preseed
+++ b/builder/website/debian.preseed
@@ -227,7 +227,7 @@ d-i partman/confirm_nooverwrite boolean true
 # so this will only work if the disks are the same size.
 #d-i partman-auto/disk string /dev/sda /dev/sdb
 
-# Next you need to specify the physical partitions that will be used. 
+# Next you need to specify the physical partitions that will be used.
 #d-i partman-auto/expert_recipe string \
 #  multiraid :: \
 #  1000 5000 4000 raid  \
diff --git a/builder/website/index b/builder/website/index
index 5645ddf..aea33aa 100644
--- a/builder/website/index
+++ b/builder/website/index
@@ -10,14 +10,14 @@ size=6442450944
 compressed_size=197139324
 expand=/dev/sda3
 notes=CentOS 6.5
- 
+
  This CentOS image contains only unmodified @Core group packages.
- 
+
  It is thus very minimal.  The kickstart and install script can be
  found in the libguestfs source tree:
- 
+
  builder/website/centos.sh
- 
+
  Note that `virt-builder centos-6' will always install the latest
  6.x release.
 
@@ -32,12 +32,12 @@ size=6442450944
 compressed_size=213203844
 expand=/dev/sda3
 notes=CentOS 7.0
- 
+
  This CentOS image contains only unmodified @Core group packages.
- 
+
  It is thus very minimal.  The kickstart and install script can be
  found in the libguestfs source tree:
- 
+
  builder/website/centos.sh
 
 [cirros-0.3.1]
@@ -50,13 +50,13 @@ size=41126400
 compressed_size=11419004
 expand=/dev/sda1
 notes=CirrOS 0.3.1
- 
+
  CirrOS is a commonly used test image, ideal because it is very
  small and boots into a minimally usable Linux system.
- 
+
  Note this is not a real Linux distribution, and several virt-builder
  features such as installing packages will not (and cannot) work.
- 
+
  This CirrOS image comes from https://launchpad.net/cirros
 
 [debian-6]
@@ -71,24 +71,24 @@ size=4294967296
 compressed_size=139615908
 expand=/dev/sda1
 notes=Debian 6 (Squeeze).
- 
+
  This is a default Debian install.
- 
+
  The preseed and virt-install scripts that produced this image
  can be found in the libguestfs source tree:
- 
+
  builder/website/debian.preseed
  builder/website/debian.sh
- 
+
  This image is so very minimal that it only includes an ssh
  server and no virtual consoles.  To enable virtual consoles
  use this virt-builder option:
- 
+
  virt-builder debian-6 \
  --edit '/etc/inittab: s,^#([1-9].*respawn.*/sbin/getty.*),$1,'
- 
+
  This image does not contain SSH host keys.  To regenerate them use:
- 
+
  --firstboot-command dpkg-reconfigure openssh-server
 
 [debian-7]
@@ -103,24 +103,24 @@ size=4294967296
 compressed_size=150734028
 expand=/dev/sda1
 notes=Debian 7 (Wheezy).
- 
+
  This is a default Debian install.
- 
+
  The preseed and virt-install scripts that produced this image
  can be found in the libguestfs source tree:
- 
+
  builder/website/debian.preseed
  builder/website/debian.sh
- 
+
  This image is so very minimal that it only includes an ssh
  server and no virtual consoles.  To enable virtual consoles
  use this virt-builder option:
- 
+
  virt-builder debian-7 \
  --edit '/etc/inittab: s,^#([1-9].*respawn.*/sbin/getty.*),$1,'
- 
+
  This image does not contain SSH host keys.  To regenerate them use:
- 
+
  --firstboot-command dpkg-reconfigure openssh-server
 
 [fedora-18]
@@ -134,14 +134,14 @@ size=6442450944
 compressed_size=148947524
 expand=/dev/sda3
 notes=Fedora 18.
- 
+
  This Fedora image contains only unmodified @Core group packages.
- 
+
  It is thus very minimal.  The kickstart and install script can be
  found in the libguestfs source tree:
- 
+
  builder/website/fedora.sh
- 
+
  Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
  Source and further information is available from http://fedoraproject.org/
 
@@ -157,14 +157,14 @@ size=4294967296
 compressed_size=169531628
 expand=/dev/sda3
 notes=Fedora 19.
- 
+
  This Fedora image contains only unmodified @Core group packages.
- 
+
  It is thus very minimal.  The kickstart and install script can be
  found in the libguestfs source tree:
- 
+
  builder/website/fedora.sh
- 
+
  Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
  Source and further information is available from 

[Libguestfs] [PATCH 12/13] syntax-check: fix require_config_h_first check

2014-09-23 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com
---
 python/guestfs-py-byhand.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/python/guestfs-py-byhand.c b/python/guestfs-py-byhand.c
index b071f81..5d2d858 100644
--- a/python/guestfs-py-byhand.c
+++ b/python/guestfs-py-byhand.c
@@ -24,11 +24,11 @@
 /* This has to be included first, else definitions conflict with
  * glibc header files.  Python is broken.
  */
+#include config.h
+
 #define PY_SSIZE_T_CLEAN 1
 #include Python.h
 
-#include config.h
-
 #include stdio.h
 #include stdlib.h
 
-- 
1.9.3

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


[Libguestfs] [PATCH 07/13] syntax-check: fix prohibit_empty_lines_at_EOF check

2014-09-23 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com
---
 builder/website/ubuntu.preseed | 1 -
 guestfs-release-notes.txt  | 1 -
 p2v/issue  | 1 -
 tests/guests/guest-aux/debian-packages | 1 -
 4 files changed, 4 deletions(-)

diff --git a/builder/website/ubuntu.preseed b/builder/website/ubuntu.preseed
index 236e174..dbe4f79 100644
--- a/builder/website/ubuntu.preseed
+++ b/builder/website/ubuntu.preseed
@@ -373,4 +373,3 @@ xserver-xorg xserver-xorg/config/monitor/mode-list \
 # directly, or use the apt-install and in-target commands to easily install
 # packages and run commands in the target system.
 #d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh
-
diff --git a/guestfs-release-notes.txt b/guestfs-release-notes.txt
index 1baa447..3eada81 100644
--- a/guestfs-release-notes.txt
+++ b/guestfs-release-notes.txt
@@ -3248,4 +3248,3 @@ BUGS
 
   * Run libguestfs-test-tool(1) and paste the complete, unedited output
   into the bug report.
-
diff --git a/p2v/issue b/p2v/issue
index ae0930f..9b2839e 100644
--- a/p2v/issue
+++ b/p2v/issue
@@ -11,4 +11,3 @@ If virt-p2v didn't start automatically, look for logs:
 
 systemctl status p2v -l
 ***
-
diff --git a/tests/guests/guest-aux/debian-packages 
b/tests/guests/guest-aux/debian-packages
index 38afc97..cdd0d27 100644
--- a/tests/guests/guest-aux/debian-packages
+++ b/tests/guests/guest-aux/debian-packages
@@ -45,4 +45,3 @@ Description: this is a test package
  .
  Don't confuse it with a real package.
 Homepage: http://libguestfs.org/
-
-- 
1.9.3

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


[Libguestfs] [PATCH 10/13] syntax-check: fix prohibit_test_minus_ao check

2014-09-23 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com
---
 align/test-virt-alignment-scan-guests.sh | 2 +-
 align/test-virt-alignment-scan.sh| 2 +-
 builder/test-virt-builder-planner.sh | 2 +-
 builder/website/ubuntu.sh| 2 +-
 configure.ac | 2 +-
 fish/test-mount-local.sh | 2 +-
 make-fs/test-virt-make-fs.sh | 2 +-
 src/api-support/update-from-tarballs.sh  | 2 +-
 sysprep/test-virt-sysprep-script.sh  | 2 +-
 tests/qemu/qemu-snapshot-isolation.sh| 2 +-
 tests/regressions/rhbz563450.sh  | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/align/test-virt-alignment-scan-guests.sh 
b/align/test-virt-alignment-scan-guests.sh
index 99e2585..50b9260 100755
--- a/align/test-virt-alignment-scan-guests.sh
+++ b/align/test-virt-alignment-scan-guests.sh
@@ -30,6 +30,6 @@ $VG virt-alignment-scan -c $libvirt_uri
 r=$?
 
 # 0, 2 and 3 are reasonable non-error exit codes.  Others are errors.
-if [ $r -ne 0 -a $r -ne 2 -a $r -ne 3 ]; then
+if [ $r -ne 0  $r -ne 2  $r -ne 3 ]; then
 exit $r
 fi
diff --git a/align/test-virt-alignment-scan.sh 
b/align/test-virt-alignment-scan.sh
index 293a9ef..7f02ba9 100755
--- a/align/test-virt-alignment-scan.sh
+++ b/align/test-virt-alignment-scan.sh
@@ -22,6 +22,6 @@ $VG virt-alignment-scan -a ../tests/guests/fedora.img
 r=$?
 
 # 0, 2 and 3 are reasonable non-error exit codes.  Others are errors.
-if [ $r -ne 0 -a $r -ne 2 -a $r -ne 3 ]; then
+if [ $r -ne 0  $r -ne 2  $r -ne 3 ]; then
 exit $r
 fi
diff --git a/builder/test-virt-builder-planner.sh 
b/builder/test-virt-builder-planner.sh
index f974c27..adf461e 100755
--- a/builder/test-virt-builder-planner.sh
+++ b/builder/test-virt-builder-planner.sh
@@ -24,7 +24,7 @@ abs_builddir=$(pwd)
 export XDG_CONFIG_HOME=
 export XDG_CONFIG_DIRS=$abs_builddir/test-config
 
-if [ ! -f fedora.xz -o ! -f fedora.qcow2 -o ! -f fedora.qcow2.xz ]; then
+if [ ! -f fedora.xz || ! -f fedora.qcow2 || ! -f fedora.qcow2.xz ]; then
 echo $0: test skipped because there is no fedora.xz, fedora.qcow2 or 
fedora.qcow2.xz in the build directory
 exit 77
 fi
diff --git a/builder/website/ubuntu.sh b/builder/website/ubuntu.sh
index 0863fb0..16cf91f 100755
--- a/builder/website/ubuntu.sh
+++ b/builder/website/ubuntu.sh
@@ -26,7 +26,7 @@ export LANG=C
 set -e
 set -x
 
-if [ $# -lt 2 -o $# -gt 3 ]; then
+if [ $# -lt 2 || $# -gt 3 ]; then
 echo $0 VERSION DIST [OSVARIANT]
 exit 1
 fi
diff --git a/configure.ac b/configure.ac
index 9578b59..47272fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1531,7 +1531,7 @@ AS_IF([test x$enable_gobject != xno],[
 [AC_MSG_WARN([gio library not found, gobject binding will be disabled])])
 ])
 AM_CONDITIONAL([HAVE_GOBJECT],
-   [test x$GOBJECT_LIBS != x -a x$GIO_LIBS != x])
+   [test x$GOBJECT_LIBS != x  x$GIO_LIBS != x])
 
 AC_CHECK_PROG([GJS],[gjs],[gjs])
 AS_IF([test x$GJS = x],
diff --git a/fish/test-mount-local.sh b/fish/test-mount-local.sh
index 845f707..0bc4f5d 100755
--- a/fish/test-mount-local.sh
+++ b/fish/test-mount-local.sh
@@ -33,7 +33,7 @@ test -w /dev/fuse || {
 
 set -e
 
-if [ $# -gt 0 -a $1 = --run-test ]; then
+if [ $# -gt 0  $1 = --run-test ]; then
 # Create some files and read them back.
 echo 'hello'  test-mount-local-mp/hello
 chmod 0600 test-mount-local-mp/hello
diff --git a/make-fs/test-virt-make-fs.sh b/make-fs/test-virt-make-fs.sh
index 2ed3ce9..067e665 100755
--- a/make-fs/test-virt-make-fs.sh
+++ b/make-fs/test-virt-make-fs.sh
@@ -57,7 +57,7 @@ function random_choice
 # in the appliance fails when trying to change the UID of
 # the files to some non-zero value (not supported by FAT).
 choices=(--type=ext2 --type=ext3 --type=ext4)
-if [ $ntfs3g_available = yes -a $ntfsprogs_available = yes ]; then
+if [ $ntfs3g_available = yes  $ntfsprogs_available = yes ]; then
 choices[${#choices[*]}]=--type=ntfs
 fi
 if [ $btrfs_available = yes ]; then
diff --git a/src/api-support/update-from-tarballs.sh 
b/src/api-support/update-from-tarballs.sh
index 328b11b..e2160c7 100755
--- a/src/api-support/update-from-tarballs.sh
+++ b/src/api-support/update-from-tarballs.sh
@@ -36,7 +36,7 @@ for t in $tarballs; do
 # x.y.z
 v=$(echo $p | sed 's/^libguestfs-//')
 
-if [ $v != 1.2.0 -a $v != 1.3.0 -a ! -f $v ]; then
+if [ $v != 1.2.0  $v != 1.3.0  ! -f $v ]; then
 rm -rf $tmpdir/*
 tar -C $tmpdir \
 -zxf $t $p/src/*.c 2/dev/null ||:
diff --git a/sysprep/test-virt-sysprep-script.sh 
b/sysprep/test-virt-sysprep-script.sh
index 10ba1d1..65813d5 100755
--- a/sysprep/test-virt-sysprep-script.sh
+++ b/sysprep/test-virt-sysprep-script.sh
@@ -37,7 +37,7 @@ if ! virt-sysprep -q -n -a ../tests/guests/fedora.img 
--enable script \
 echo $0: virt-sysprep wasn't expected to exit with error.
 exit 1
 fi
-if [ ! -f stamp-script1.sh -o ! -f stamp-script2.sh ]; then
+if [ ! -f stamp-script1.sh || ! -f stamp-script2.sh ]; 

[Libguestfs] [PATCH 03/13] syntax-check: fix makefile_at_at_check

2014-09-23 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com
---
 align/Makefile.am|  2 +-
 builder/Makefile.am  |  2 +-
 builder/website/Makefile.am  |  2 +-
 cat/Makefile.am  |  4 ++--
 common-rules.mk  |  8 
 customize/Makefile.am|  2 +-
 df/Makefile.am   |  4 ++--
 diff/Makefile.am |  2 +-
 erlang/examples/Makefile.am  |  4 ++--
 examples/Makefile.am | 16 
 fish/Makefile.am |  2 +-
 format/Makefile.am   |  2 +-
 golang/examples/Makefile.am  |  4 ++--
 inspector/Makefile.am|  4 ++--
 java/examples/Makefile.am|  4 ++--
 lua/Makefile.am  |  2 +-
 lua/examples/Makefile.am |  4 ++--
 make-fs/Makefile.am  |  2 +-
 mllib/Makefile.am|  2 +-
 ocaml/Makefile.am|  2 +-
 ocaml/examples/Makefile.am   |  4 ++--
 perl/examples/Makefile.am|  4 ++--
 python/examples/Makefile.am  |  4 ++--
 rescue/Makefile.am   |  2 +-
 resize/Makefile.am   |  2 +-
 ruby/examples/Makefile.am|  4 ++--
 sparsify/Makefile.am |  2 +-
 src/Makefile.am  |  2 +-
 sysprep/Makefile.am  |  4 ++--
 test-tool/Makefile.am|  2 +-
 tests/c-api/Makefile.am  |  2 +-
 tests/fuzz/Makefile.am   |  2 +-
 tests/mount-local/Makefile.am|  2 +-
 tests/parallel/Makefile.am   |  2 +-
 tests/relative-paths/Makefile.am |  2 +-
 v2v/Makefile.am  |  2 +-
 36 files changed, 58 insertions(+), 58 deletions(-)

diff --git a/align/Makefile.am b/align/Makefile.am
index 4ecbf7e..ed59c7a 100644
--- a/align/Makefile.am
+++ b/align/Makefile.am
@@ -98,4 +98,4 @@ TESTS += \
 endif
 
 check-valgrind:
-   $(MAKE) VG=$(top_builddir)/run @VG@ check
+   $(MAKE) VG=$(top_builddir)/run $(VG) check
diff --git a/builder/Makefile.am b/builder/Makefile.am
index eb6295a..843bac1 100644
--- a/builder/Makefile.am
+++ b/builder/Makefile.am
@@ -245,7 +245,7 @@ TESTS += test-virt-builder.sh
 endif ENABLE_APPLIANCE
 
 check-valgrind:
-   $(MAKE) VG=$(top_builddir)/run @VG@ check
+   $(MAKE) VG=$(top_builddir)/run $(VG) check
 
 check-slow:
$(MAKE) TESTS=test-virt-builder-planner.sh check
diff --git a/builder/website/Makefile.am b/builder/website/Makefile.am
index a2d29df..967a4fb 100644
--- a/builder/website/Makefile.am
+++ b/builder/website/Makefile.am
@@ -41,4 +41,4 @@ TESTS_ENVIRONMENT = $(top_builddir)/run --test
 TESTS = validate.sh
 
 check-valgrind:
-   $(MAKE) VG=$(top_builddir)/run @VG@ check
+   $(MAKE) VG=$(top_builddir)/run $(VG) check
diff --git a/cat/Makefile.am b/cat/Makefile.am
index 14b8e81..8165589 100644
--- a/cat/Makefile.am
+++ b/cat/Makefile.am
@@ -198,9 +198,9 @@ TESTS = \
 endif ENABLE_APPLIANCE
 
 check-valgrind:
-   $(MAKE) VG=$(top_builddir)/run @VG@ check
+   $(MAKE) VG=$(top_builddir)/run $(VG) check
 
 check-valgrind-local-guests:
for g in $(GUESTS); do \
- $(top_builddir)/run --test @VG@ ./virt-filesystems -c 
$(libvirt_ro_uri) -d $$g --all --long -h --uuid || exit $$?; \
+ $(top_builddir)/run --test $(VG) ./virt-filesystems -c 
$(libvirt_ro_uri) -d $$g --all --long -h --uuid || exit $$?; \
done
diff --git a/common-rules.mk b/common-rules.mk
index 312107e..abee902 100644
--- a/common-rules.mk
+++ b/common-rules.mk
@@ -23,7 +23,7 @@
 # Old RHEL 5 autoconf defines these, but RHEL 5 automake doesn't
 # create variables for them.  So define them here if they're not
 # defined already.
-builddir ?= @builddir@
-abs_builddir ?= @abs_builddir@
-srcdir   ?= @srcdir@
-abs_srcdir   ?= @abs_srcdir@
+builddir ?= $(builddir)
+abs_builddir ?= $(abs_builddir)
+srcdir   ?= $(srcdir)
+abs_srcdir   ?= $(abs_srcdir)
diff --git a/customize/Makefile.am b/customize/Makefile.am
index 746375d..0f2571b 100644
--- a/customize/Makefile.am
+++ b/customize/Makefile.am
@@ -182,7 +182,7 @@ TESTS = test-virt-customize.sh
 endif
 
 check-valgrind:
-   $(MAKE) VG=$(top_builddir)/run @VG@ check
+   $(MAKE) VG=$(top_builddir)/run $(VG) check
 
 # Dependencies.
 depend: .depend
diff --git a/df/Makefile.am b/df/Makefile.am
index 29e0bf5..e6ab953 100644
--- a/df/Makefile.am
+++ b/df/Makefile.am
@@ -101,7 +101,7 @@ TESTS += \
 endif ENABLE_APPLIANCE
 
 check-valgrind:
-   $(MAKE) VG=$(top_builddir)/run @VG@ check
+   $(MAKE) VG=$(top_builddir)/run $(VG) check
 
 check-valgrind-local-guests:
-   $(top_builddir)/run --test @VG@ ./virt-df -c $(libvirt_ro_uri)
+   $(top_builddir)/run --test $(VG) ./virt-df -c $(libvirt_ro_uri)
diff --git a/diff/Makefile.am b/diff/Makefile.am
index 3c2c211..2735626 100644
--- a/diff/Makefile.am
+++ b/diff/Makefile.am
@@ -84,4 +84,4 @@ TESTS = \
 endif ENABLE_APPLIANCE
 
 check-valgrind:
-   $(MAKE) VG=$(top_builddir)/run @VG@ check
+   $(MAKE) VG=$(top_builddir)/run $(VG) 

[Libguestfs] [PATCH 09/13] syntax-check: fix prohibit_path_max_allocation check

2014-09-23 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com
---
 daemon/inotify.c | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/daemon/inotify.c b/daemon/inotify.c
index 36e5ede..b847b7d 100644
--- a/daemon/inotify.c
+++ b/daemon/inotify.c
@@ -309,7 +309,7 @@ do_inotify_files (void)
   unsigned int i;
   FILE *fp = NULL;
   guestfs_int_inotify_event_list *events;
-  char buf[PATH_MAX];
+  char *buf = NULL;
   char tempfile[] = /tmp/inotifyXX;
   int fd;
   char cmd[64];
@@ -361,6 +361,12 @@ do_inotify_files (void)
 return NULL;
   }
 
+  buf = malloc(PATH_MAX);
+  if (buf == NULL) {
+reply_with_perror (malloc);
+goto error;
+  }
+
   while (fgets (buf, sizeof buf, fp) != NULL) {
 size_t len = strlen (buf);
 
@@ -374,6 +380,8 @@ do_inotify_files (void)
   fclose (fp); /* implicitly closes fd */
   fp = NULL;
 
+  free(buf);
+
   if (end_stringsbuf (ret) == -1)
 goto error;
 
@@ -384,6 +392,8 @@ do_inotify_files (void)
   if (fp != NULL)
 fclose (fp);
 
+  free (buf);
+
   unlink (tempfile);
   return NULL;
 }
-- 
1.9.3

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] libguestfs fails on FreeBSD9.3, MINIX3 qcow2 images

2014-09-23 Thread Pino Toscano
Hello Assaf,

On Thursday 18 September 2014 11:38:09 Assaf Gordon wrote:
 I'm experimenting with libguestfs on non-linux VMs, encountered errors
 on FreeBSD9.3 and MINIX3 (and few others, but these ones are easy to
 share), with host Ubuntu 14.04.01 LTS x86-64.

Thanks for the images!

Now with recent versions of libguestfs (= 1.27.53, currently to be 
released yet), a basic Minix detection is done.
For further details, see
  https://bugzilla.redhat.com/show_bug.cgi?id=1144137
(feel free to subscribe to it).

-- 
Pino Toscano

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


[Libguestfs] Virt-v2v conversion issue

2014-09-23 Thread VONDRA Alain
Hi,
I am running virt-v2v under CentOS 7, I use the new libguestfs-1.27.48-1.1, and 
when I try to import my Windows 2008 (running perfectly using virt-manager) in 
my cloud oVirt, I encounter this issue :

libguestfs: trace: mkdir_p = 0
libguestfs: trace: case_sensitive_path /Windows/system32/drivers/viostor.sys
libguestfs: trace: case_sensitive_path = /Windows/System32/drivers/viostor.sys
libguestfs: trace: cp /usr/share/virtio-win/drivers/amd64/Win2008/viostor.sys 
/Windows/System32/drivers/viostor.sys
libguestfs: trace: cp = -1 (error)
libguestfs: trace: hivex_close
libguestfs: trace: hivex_close = 0
virt-v2v: error: libguestfs error: cp: cp: cannot stat
'/sysroot/usr/share/virtio-win/drivers/amd64/Win2008/viostor.sys': No such
file or directory

If reporting bugs, run virt-v2v with debugging enabled and include the
complete output:

  virt-v2v -v -x [...]
libguestfs: trace: close
libguestfs: trace: internal_autosync
libguestfs: trace: internal_autosync = 0

The virtio-win folder is present and viostor.sys also.
Can you help me to debug this issue ?

Thank you and have a nice day
Alain






Alain VONDRA
Charg? d'exploitation des Syst?mes d'Information
Direction Administrative et Financi?re
+33 1 44 39 77 76
UNICEF France
3 rue Duguay Trouin  75006 PARIS
www.unicef.frhttp://www.unicef.fr/

[cid:urgence_ebola258bf0]http://www.unicef.fr









___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] [PATCH] inspect: map Hurd devices, and enable fstab introspection

2014-09-23 Thread Richard W.M. Jones
On Tue, Sep 23, 2014 at 10:46:26AM +0200, Pino Toscano wrote:
 Add a mapping for the Hurd device names, so it is possible to enable the
 inspection of /etc/fstab.
 ---
  src/inspect-fs-unix.c | 25 -
  1 file changed, 24 insertions(+), 1 deletion(-)
 
 diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c
 index 3f57cd5..b629508 100644
 --- a/src/inspect-fs-unix.c
 +++ b/src/inspect-fs-unix.c
 @@ -78,6 +78,7 @@ static pcre *re_opensuse_version;
  static pcre *re_sles_version;
  static pcre *re_sles_patchlevel;
  static pcre *re_minix;
 +static pcre *re_hurd_dev;
  
  static void compile_regexps (void) __attribute__((constructor));
  static void free_regexps (void) __attribute__((destructor));
 @@ -137,6 +138,7 @@ compile_regexps (void)
COMPILE (re_sles_version, ^VERSION = (\\d+), 0);
COMPILE (re_sles_patchlevel, ^PATCHLEVEL = (\\d+), 0);
COMPILE (re_minix, ^(\\d+)\\.(\\d+)(\\.(\\d+))?, 0);
 +  COMPILE (re_hurd_dev, ^/dev/(h)d(\\d+)s(\\d+)$, 0);
  }
  
  static void
 @@ -170,6 +172,7 @@ free_regexps (void)
pcre_free (re_sles_version);
pcre_free (re_sles_patchlevel);
pcre_free (re_minix);
 +  pcre_free (re_hurd_dev);
  }
  
  static void check_architecture (guestfs_h *g, struct inspect_fs *fs);
 @@ -776,7 +779,11 @@ guestfs___check_hurd_root (guestfs_h *g, struct 
 inspect_fs *fs)
/* Determine the architecture. */
check_architecture (g, fs);
  
 -  /* XXX Check for /etc/fstab. */
 +  if (guestfs_is_file (g, /etc/fstab)  0) {
 +const char *configfiles[] = { /etc/fstab, NULL };
 +if (inspect_with_augeas (g, fs, configfiles, check_fstab) == -1)
 +  return -1;
 +  }
  
/* Determine hostname. */
if (check_hostname_unix (g, fs) == -1)
 @@ -1635,6 +1642,22 @@ resolve_fstab_device (guestfs_h *g, const char *spec, 
 Hash_table *md_map)
  if (r == -1)
return NULL;
}
 +  else if (match3 (g, spec, re_hurd_dev, type, disk, part)) {
 +/* Hurd disk devices are like /dev/hdNsM, where hdN is the
 + * N-th disk and M is the M-th partition on that disk.
 + * Turn the disk number into a letter-based identifier, so
 + * we can resolve it easily.
 + */
 +int disk_i = guestfs___parse_unsigned_int (g, disk);
 +char disk_as_letter[2] = { 0 };
 +disk_as_letter[0] = disk_i + 'a';

Not sure if my rusty C is enough to say whether disk_as_letter[1] is
initialized properly here.  It might make sense to have that explicit,
ie. { 0, 0 }

 +r = resolve_fstab_device_xdev (g, type, disk_as_letter, part, device);
 +free (type);
 +free (disk);
 +free (part);
 +if (r == -1)
 +  return NULL;
 +  }
  
/* Didn't match device pattern, return original spec unchanged. */
if (device == NULL)
 -- 
 1.9.3

ACK.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] Virt-v2v conversion issue

2014-09-23 Thread Richard W.M. Jones
On Tue, Sep 23, 2014 at 08:50:13AM +, VONDRA Alain wrote:
 Hi,
 I am running virt-v2v under CentOS 7, I use the new libguestfs-1.27.48-1.1, 
 and when I try to import my Windows 2008 (running perfectly using 
 virt-manager) in my cloud oVirt, I encounter this issue :
 
 libguestfs: trace: mkdir_p = 0
 libguestfs: trace: case_sensitive_path /Windows/system32/drivers/viostor.sys
 libguestfs: trace: case_sensitive_path = 
 /Windows/System32/drivers/viostor.sys
 libguestfs: trace: cp 
 /usr/share/virtio-win/drivers/amd64/Win2008/viostor.sys 
 /Windows/System32/drivers/viostor.sys
 libguestfs: trace: cp = -1 (error)
 libguestfs: trace: hivex_close
 libguestfs: trace: hivex_close = 0
 virt-v2v: error: libguestfs error: cp: cp: cannot stat
 '/sysroot/usr/share/virtio-win/drivers/amd64/Win2008/viostor.sys': No such
 file or directory

This was fixed yesterday:

https://github.com/libguestfs/libguestfs/commit/7b428603e3a6dc43c48e276b192fda05a4a50a13

I've not got around to getting a build out which includes this fix,
but it will be fixed in = 1.27.53.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


[Libguestfs] Why is virt-resize designed to involve two disks?

2014-09-23 Thread Zhi Yong Wu
HI,

As you've known, vhd-util and qemu-img both provide the capacity for
resizing the original disk, but why is virt-resize designed to involve
two disks, not only original disk? Is there any concern? Is it
possible that only one original disk is involved in virt-resize?


-- 
Regards,

Zhi Yong Wu

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


[Libguestfs] Why is virt-resize designed to involve two disks?

2014-09-23 Thread 吴志勇
HI,
As you've known, vhd-util and qemu-img both provide the capacity for resizing 
the original disk, but why is virt-resize designed to involve two disks, not 
only original disk? Is there any concern? Is it possible that only one original 
disk is involved in virt-resize?

-- 
Regards,
 
Zhi Yong Wu
___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] Why is virt-resize designed to involve two disks?

2014-09-23 Thread Richard W.M. Jones
On Tue, Sep 23, 2014 at 06:19:21PM +0800, Zhi Yong Wu wrote:
 As you've known, vhd-util and qemu-img both provide the capacity for
 resizing the original disk,

.. although they only resize the container, not the contents which is
what virt-resize does.  So these tools are not really comparable.

 but why is virt-resize designed to involve
 two disks, not only original disk? Is there any concern? Is it
 possible that only one original disk is involved in virt-resize?

I'm guessing this question is why virt-resize doesn't work on disk
images in-place.

This I hope is answered in the FAQ here:

  
http://libguestfs.org/guestfs-faq.1.html#why-doesnt-virt-resize-work-on-the-disk-image-in-place

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] [PATCH 12/13] syntax-check: fix require_config_h_first check

2014-09-23 Thread Pino Toscano
On Tuesday 23 September 2014 17:20:38 Hu Tao wrote:
 Signed-off-by: Hu Tao hu...@cn.fujitsu.com
 ---
  python/guestfs-py-byhand.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/python/guestfs-py-byhand.c b/python/guestfs-py-byhand.c
 index b071f81..5d2d858 100644
 --- a/python/guestfs-py-byhand.c
 +++ b/python/guestfs-py-byhand.c
 @@ -24,11 +24,11 @@
  /* This has to be included first, else definitions conflict with
   * glibc header files.  Python is broken.
   */
 +#include config.h
 +
  #define PY_SSIZE_T_CLEAN 1
  #include Python.h
 
 -#include config.h
 -
  #include stdio.h
  #include stdlib.h

This is wrong, and the commit above in that code part tells you why.

-- 
Pino Toscano

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] [PATCH 09/13] syntax-check: fix prohibit_path_max_allocation check

2014-09-23 Thread Pino Toscano
On Tuesday 23 September 2014 17:20:35 Hu Tao wrote:
 Signed-off-by: Hu Tao hu...@cn.fujitsu.com
 ---
  daemon/inotify.c | 12 +++-
  1 file changed, 11 insertions(+), 1 deletion(-)

While I'd personally get rid of PATH_MAX at all, I understand the Linux 
inotify implementation relies on it...

 
 diff --git a/daemon/inotify.c b/daemon/inotify.c
 index 36e5ede..b847b7d 100644
 --- a/daemon/inotify.c
 +++ b/daemon/inotify.c
 @@ -309,7 +309,7 @@ do_inotify_files (void)
unsigned int i;
FILE *fp = NULL;
guestfs_int_inotify_event_list *events;
 -  char buf[PATH_MAX];
 +  char *buf = NULL;

Make it CLEANUP_FREE, so you don't need to manually free it later (and 
gets freed in every exit point of the function).

-- 
Pino Toscano

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] [PATCH 11/13] syntax-check: fix prohibit_undesirable_word_seq check

2014-09-23 Thread Pino Toscano
On Tuesday 23 September 2014 17:20:37 Hu Tao wrote:
 Signed-off-by: Hu Tao hu...@cn.fujitsu.com
 ---
  BUGS| 6 +++---
  guestfs-release-notes.pod   | 8 
  guestfs-release-notes.txt   | 8 
  po-docs/ja.po   | 8 
  po-docs/libguestfs-docs.pot | 8 
  po-docs/uk.po   | 8 
  6 files changed, 23 insertions(+), 23 deletions(-)

All of these are bug summaries, so I don't think it's correct to fix 
typos in them in the documentation only.

-- 
Pino Toscano

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] [PATCH 01/13] syntax-check: dirty hack to pass bindtextdomain check

2014-09-23 Thread Pino Toscano
On Tuesday 23 September 2014 17:20:27 Hu Tao wrote:
 Signed-off-by: Hu Tao hu...@cn.fujitsu.com
 ---
  p2v/gui.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/p2v/gui.c b/p2v/gui.c
 index a50307d..2df5017 100644
 --- a/p2v/gui.c
 +++ b/p2v/gui.c
 @@ -69,7 +69,7 @@ static GtkWidget *run_dlg,
*cancel_button;
 
  /* The entry point from the main program.
 - * Note that gtk_init etc have already been called in main().
 + * Note that gtk_init etc have already been called in main_().
   */
  void
  gui_application (struct config *config)

Maybe it would be better to just remove () from the commit; after all, 
earlier in that comment gtk_init has no () either.

-- 
Pino Toscano

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] [PATCH 00/13] syntax-check

2014-09-23 Thread Pino Toscano
Hi Hu,

On Tuesday 23 September 2014 17:20:26 Hu Tao wrote:
 This series includes patches to make `make syntax-check` pass.

Thanks for your work. I have few general notes about it:

- please be more descriptive about each issue: just tell in the first
  line of the commit what is the actual change (like remove extra
  getopt.h includes), mentioning the check name in the long
  description. This way it is more clear what the change was about, also
  in case sometime in the future some of those checks is removed.

- in case of unused includes, I'd say it should be fine to just remove
  them together in a single commit

I'll comment on specific issues in each commit.

 Some of the fix require change to maint.mk, but the file is not in git
 repo. Is it intended?

This file comes from gnulib (see .gnulib/top/maint.mk), so changes to it 
need to go to gnulib (and most probably require FSF copyright 
assignment, but I'm not sure about it).

Thanks,
-- 
Pino Toscano

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] [PATCH 13/13] syntax-check: fix trailing_blank check

2014-09-23 Thread Pino Toscano
On Tuesday 23 September 2014 17:20:39 Hu Tao wrote:
 Signed-off-by: Hu Tao hu...@cn.fujitsu.com
 ---
  builder/website/index  | 120 +-
  builder/website/index.asc  | 120 +-

The index files for virt-builder need a trailing space to indicate a 
continuation line in notes, so the changes in these files are not 
correct.

  fish/test-file-attrs.sh|  10 +-

This is comparing the output that you get from guestish, so the changes 
here are not correct.

  guestfs-release-notes.txt  | 520
 -

guestfs-release-notes.txt is generated from guestfs-release-notes.pod.

  podwrapper.pl.in   |   6 +- 
  tools/virt-win-reg |   2 +-



  v2v/test-v2v-print-source.sh   |   4 +-
  11 files changed, 395 insertions(+), 395 deletions(-)
 
 diff --git a/builder/website/debian.preseed
 b/builder/website/debian.preseed index faa4430..d3158a5 100644
 --- a/builder/website/debian.preseed
 +++ b/builder/website/debian.preseed
 @@ -227,7 +227,7 @@ d-i partman/confirm_nooverwrite boolean true
  # so this will only work if the disks are the same size.
  #d-i partman-auto/disk string /dev/sda /dev/sdb
 
 -# Next you need to specify the physical partitions that will be used.
 +# Next you need to specify the physical partitions that will be
 used. #d-i partman-auto/expert_recipe string \
  #  multiraid :: \
  #  1000 5000 4000 raid  \
 diff --git a/builder/website/index b/builder/website/index
 index 5645ddf..aea33aa 100644
 --- a/builder/website/index
 +++ b/builder/website/index
 @@ -10,14 +10,14 @@ size=6442450944
  compressed_size=197139324
  expand=/dev/sda3
  notes=CentOS 6.5
 -
 +
   This CentOS image contains only unmodified @Core group packages.
 -
 +
   It is thus very minimal.  The kickstart and install script can be
   found in the libguestfs source tree:
 -
 +
   builder/website/centos.sh
 -
 +
   Note that `virt-builder centos-6' will always install the latest
   6.x release.
 
 @@ -32,12 +32,12 @@ size=6442450944
  compressed_size=213203844
  expand=/dev/sda3
  notes=CentOS 7.0
 -
 +
   This CentOS image contains only unmodified @Core group packages.
 -
 +
   It is thus very minimal.  The kickstart and install script can be
   found in the libguestfs source tree:
 -
 +
   builder/website/centos.sh
 
  [cirros-0.3.1]
 @@ -50,13 +50,13 @@ size=41126400
  compressed_size=11419004
  expand=/dev/sda1
  notes=CirrOS 0.3.1
 -
 +
   CirrOS is a commonly used test image, ideal because it is very
   small and boots into a minimally usable Linux system.
 -
 +
   Note this is not a real Linux distribution, and several virt-builder
 features such as installing packages will not (and cannot) work. -
 +
   This CirrOS image comes from https://launchpad.net/cirros
 
  [debian-6]
 @@ -71,24 +71,24 @@ size=4294967296
  compressed_size=139615908
  expand=/dev/sda1
  notes=Debian 6 (Squeeze).
 -
 +
   This is a default Debian install.
 -
 +
   The preseed and virt-install scripts that produced this image
   can be found in the libguestfs source tree:
 -
 +
   builder/website/debian.preseed
   builder/website/debian.sh
 -
 +
   This image is so very minimal that it only includes an ssh
   server and no virtual consoles.  To enable virtual consoles
   use this virt-builder option:
 -
 +
   virt-builder debian-6 \
   --edit '/etc/inittab: s,^#([1-9].*respawn.*/sbin/getty.*),$1,'
 -
 +
   This image does not contain SSH host keys.  To regenerate them use:
 -
 +
   --firstboot-command dpkg-reconfigure openssh-server
 
  [debian-7]
 @@ -103,24 +103,24 @@ size=4294967296
  compressed_size=150734028
  expand=/dev/sda1
  notes=Debian 7 (Wheezy).
 -
 +
   This is a default Debian install.
 -
 +
   The preseed and virt-install scripts that produced this image
   can be found in the libguestfs source tree:
 -
 +
   builder/website/debian.preseed
   builder/website/debian.sh
 -
 +
   This image is so very minimal that it only includes an ssh
   server and no virtual consoles.  To enable virtual consoles
   use this virt-builder option:
 -
 +
   virt-builder debian-7 \
   --edit '/etc/inittab: s,^#([1-9].*respawn.*/sbin/getty.*),$1,'
 -
 +
   This image does not contain SSH host keys.  To regenerate them use:
 -
 +
   --firstboot-command dpkg-reconfigure openssh-server
 
  [fedora-18]
 @@ -134,14 +134,14 @@ size=6442450944
  compressed_size=148947524
  expand=/dev/sda3
  notes=Fedora 18.
 -
 +
   This Fedora image contains only unmodified @Core group packages.
 -
 +
   It is thus very minimal.  The kickstart and install script can be
   found in the libguestfs source tree:
 -
 +
   builder/website/fedora.sh
 -
 +
   Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
   Source and further information is available from
 http://fedoraproject.org/
 
 @@ -157,14 +157,14 @@ size=4294967296
  compressed_size=169531628
  expand=/dev/sda3
  notes=Fedora 19.
 -
 

Re: [Libguestfs] [PATCH 01/13] syntax-check: dirty hack to pass bindtextdomain check

2014-09-23 Thread Richard W.M. Jones
On Tue, Sep 23, 2014 at 04:00:44PM +0200, Pino Toscano wrote:
 On Tuesday 23 September 2014 17:20:27 Hu Tao wrote:
  Signed-off-by: Hu Tao hu...@cn.fujitsu.com
  ---
   p2v/gui.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
  
  diff --git a/p2v/gui.c b/p2v/gui.c
  index a50307d..2df5017 100644
  --- a/p2v/gui.c
  +++ b/p2v/gui.c
  @@ -69,7 +69,7 @@ static GtkWidget *run_dlg,
 *cancel_button;
  
   /* The entry point from the main program.
  - * Note that gtk_init etc have already been called in main().
  + * Note that gtk_init etc have already been called in main_().
*/
   void
   gui_application (struct config *config)
 
 Maybe it would be better to just remove () from the commit; after all, 
 earlier in that comment gtk_init has no () either.

I'm not exactly sure what the problem is (except that syntax-check
should really be ignoring comments), but can we remove the
parentheses?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] [PATCH 02/13] syntax-check: fix error_message_period check

2014-09-23 Thread Richard W.M. Jones
On Tue, Sep 23, 2014 at 05:20:28PM +0800, Hu Tao wrote:
 Signed-off-by: Hu Tao hu...@cn.fujitsu.com
 ---
  resize/resize.ml | 10 +-
  sparsify/copying.ml  |  2 +-
  src/fuse.c   |  2 +-
  src/launch-libvirt.c |  4 ++--
  src/libvirt-domain.c |  2 +-
  v2v/convert_linux.ml |  6 +++---
  v2v/input_libvirt.ml |  4 ++--
  v2v/lib_ovf.ml   |  2 +-
  v2v/output_glance.ml |  2 +-
  v2v/output_rhev.ml   |  6 +++---
  v2v/v2v.ml   |  6 +++---
  11 files changed, 23 insertions(+), 23 deletions(-)
 
 diff --git a/resize/resize.ml b/resize/resize.ml
 index 81bb270..a3ea9be 100644
 --- a/resize/resize.ml
 +++ b/resize/resize.ml
 @@ -310,7 +310,7 @@ read the man page virt-resize(1).
  let infile =
try (infile, URI.parse_uri infile)
with Invalid_argument URI.parse_uri -
 -error (f_error parsing URI '%s'. Look for error messages printed 
 above.)
 +error (f_error parsing URI '%s'. Look for error messages printed 
 above)
infile in

Basically make syntax-check is wrong about all of these error
messages, which is why I don't often run it.

It's fine to have a full stop at the end of a new sentence, I think.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] [PATCH 03/13] syntax-check: fix makefile_at_at_check

2014-09-23 Thread Richard W.M. Jones
On Tue, Sep 23, 2014 at 05:20:29PM +0800, Hu Tao wrote:
  check-valgrind:
 - $(MAKE) VG=$(top_builddir)/run @VG@ check
 + $(MAKE) VG=$(top_builddir)/run $(VG) check

make syntax-check is definitely wrong about these.  We must not use
$(VG) here since it will cause VG to be expanded at the wrong place.

  # Old RHEL 5 autoconf defines these, but RHEL 5 automake doesn't
  # create variables for them.  So define them here if they're not
  # defined already.
 -builddir ?= @builddir@
 -abs_builddir ?= @abs_builddir@
 -srcdir   ?= @srcdir@
 -abs_srcdir   ?= @abs_srcdir@
 +builddir ?= $(builddir)
 +abs_builddir ?= $(abs_builddir)
 +srcdir   ?= $(srcdir)
 +abs_srcdir   ?= $(abs_srcdir)

This is also wrong because RHEL 5 (which is what these rules target)
didn't support the $(..) syntax.

Sorry, but make syntax-check is largely broken, or at least advisory.

Maybe it's better to remove it if it doesn't do anything useful?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] [PATCH 07/13] syntax-check: fix prohibit_empty_lines_at_EOF check

2014-09-23 Thread Richard W.M. Jones
On Tue, Sep 23, 2014 at 04:00:49PM +0200, Pino Toscano wrote:
 This is installed as /etc/issue in the p2v iso (see
 p2v/virt-p2v-make-disk.in). I assume the extra empty line is cosmetic.

cosmetic .. and necessary.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] [PATCH 06/13] syntax-check: fix prohibit_dirent_without_use check

2014-09-23 Thread Richard W.M. Jones
On Tue, Sep 23, 2014 at 05:20:32PM +0800, Hu Tao wrote:
 Signed-off-by: Hu Tao hu...@cn.fujitsu.com
 ---
  src/appliance.c | 1 -
  1 file changed, 1 deletion(-)
 
 diff --git a/src/appliance.c b/src/appliance.c
 index a3a083e..d7aa6b1 100644
 --- a/src/appliance.c
 +++ b/src/appliance.c
 @@ -19,7 +19,6 @@
  #include config.h
  
  #include errno.h
 -#include dirent.h
  #include stdio.h
  #include stdlib.h
  #include stdarg.h
 -- 
 1.9.3
 

ACK for 04, 05, 06.

Thanks, Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] [PATCH 09/13] syntax-check: fix prohibit_path_max_allocation check

2014-09-23 Thread Richard W.M. Jones
On Tue, Sep 23, 2014 at 04:00:54PM +0200, Pino Toscano wrote:
 On Tuesday 23 September 2014 17:20:35 Hu Tao wrote:
  Signed-off-by: Hu Tao hu...@cn.fujitsu.com
  ---
   daemon/inotify.c | 12 +++-
   1 file changed, 11 insertions(+), 1 deletion(-)
 
 While I'd personally get rid of PATH_MAX at all, I understand the Linux 
 inotify implementation relies on it...

Yup, I believe this is the case where we cannot get rid of PATH_MAX :-(

Rich.

  
  diff --git a/daemon/inotify.c b/daemon/inotify.c
  index 36e5ede..b847b7d 100644
  --- a/daemon/inotify.c
  +++ b/daemon/inotify.c
  @@ -309,7 +309,7 @@ do_inotify_files (void)
 unsigned int i;
 FILE *fp = NULL;
 guestfs_int_inotify_event_list *events;
  -  char buf[PATH_MAX];
  +  char *buf = NULL;
 
 Make it CLEANUP_FREE, so you don't need to manually free it later (and 
 gets freed in every exit point of the function).
 
 -- 
 Pino Toscano
 
 ___
 Libguestfs mailing list
 Libguestfs@redhat.com
 https://www.redhat.com/mailman/listinfo/libguestfs

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] [PATCH 10/13] syntax-check: fix prohibit_test_minus_ao check

2014-09-23 Thread Richard W.M. Jones
On Tue, Sep 23, 2014 at 05:20:36PM +0800, Hu Tao wrote:
  # 0, 2 and 3 are reasonable non-error exit codes.  Others are errors.
 -if [ $r -ne 0 -a $r -ne 2 -a $r -ne 3 ]; then
 +if [ $r -ne 0  $r -ne 2  $r -ne 3 ]; then

I think the intention of this test is that you're supposed to do:

 if [ $r -ne 0 ]  [ $r -ne 2 ] 

Note that  doesn't work as a test operator:

$ test a = b -a c = d
$ test a = b '' c = d
bash: test: too many arguments

Rich.

  exit $r
  fi
 diff --git a/align/test-virt-alignment-scan.sh 
 b/align/test-virt-alignment-scan.sh
 index 293a9ef..7f02ba9 100755
 --- a/align/test-virt-alignment-scan.sh
 +++ b/align/test-virt-alignment-scan.sh
 @@ -22,6 +22,6 @@ $VG virt-alignment-scan -a ../tests/guests/fedora.img
  r=$?
  
  # 0, 2 and 3 are reasonable non-error exit codes.  Others are errors.
 -if [ $r -ne 0 -a $r -ne 2 -a $r -ne 3 ]; then
 +if [ $r -ne 0  $r -ne 2  $r -ne 3 ]; then
  exit $r
  fi
 diff --git a/builder/test-virt-builder-planner.sh 
 b/builder/test-virt-builder-planner.sh
 index f974c27..adf461e 100755
 --- a/builder/test-virt-builder-planner.sh
 +++ b/builder/test-virt-builder-planner.sh
 @@ -24,7 +24,7 @@ abs_builddir=$(pwd)
  export XDG_CONFIG_HOME=
  export XDG_CONFIG_DIRS=$abs_builddir/test-config
  
 -if [ ! -f fedora.xz -o ! -f fedora.qcow2 -o ! -f fedora.qcow2.xz ]; then
 +if [ ! -f fedora.xz || ! -f fedora.qcow2 || ! -f fedora.qcow2.xz ]; then
  echo $0: test skipped because there is no fedora.xz, fedora.qcow2 or 
 fedora.qcow2.xz in the build directory
  exit 77
  fi
 diff --git a/builder/website/ubuntu.sh b/builder/website/ubuntu.sh
 index 0863fb0..16cf91f 100755
 --- a/builder/website/ubuntu.sh
 +++ b/builder/website/ubuntu.sh
 @@ -26,7 +26,7 @@ export LANG=C
  set -e
  set -x
  
 -if [ $# -lt 2 -o $# -gt 3 ]; then
 +if [ $# -lt 2 || $# -gt 3 ]; then
  echo $0 VERSION DIST [OSVARIANT]
  exit 1
  fi
 diff --git a/configure.ac b/configure.ac
 index 9578b59..47272fe 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -1531,7 +1531,7 @@ AS_IF([test x$enable_gobject != xno],[
  [AC_MSG_WARN([gio library not found, gobject binding will be disabled])])
  ])
  AM_CONDITIONAL([HAVE_GOBJECT],
 -   [test x$GOBJECT_LIBS != x -a x$GIO_LIBS != x])
 +   [test x$GOBJECT_LIBS != x  x$GIO_LIBS != x])
  
  AC_CHECK_PROG([GJS],[gjs],[gjs])
  AS_IF([test x$GJS = x],
 diff --git a/fish/test-mount-local.sh b/fish/test-mount-local.sh
 index 845f707..0bc4f5d 100755
 --- a/fish/test-mount-local.sh
 +++ b/fish/test-mount-local.sh
 @@ -33,7 +33,7 @@ test -w /dev/fuse || {
  
  set -e
  
 -if [ $# -gt 0 -a $1 = --run-test ]; then
 +if [ $# -gt 0  $1 = --run-test ]; then
  # Create some files and read them back.
  echo 'hello'  test-mount-local-mp/hello
  chmod 0600 test-mount-local-mp/hello
 diff --git a/make-fs/test-virt-make-fs.sh b/make-fs/test-virt-make-fs.sh
 index 2ed3ce9..067e665 100755
 --- a/make-fs/test-virt-make-fs.sh
 +++ b/make-fs/test-virt-make-fs.sh
 @@ -57,7 +57,7 @@ function random_choice
  # in the appliance fails when trying to change the UID of
  # the files to some non-zero value (not supported by FAT).
  choices=(--type=ext2 --type=ext3 --type=ext4)
 -if [ $ntfs3g_available = yes -a $ntfsprogs_available = yes ]; then
 +if [ $ntfs3g_available = yes  $ntfsprogs_available = yes ]; then
  choices[${#choices[*]}]=--type=ntfs
  fi
  if [ $btrfs_available = yes ]; then
 diff --git a/src/api-support/update-from-tarballs.sh 
 b/src/api-support/update-from-tarballs.sh
 index 328b11b..e2160c7 100755
 --- a/src/api-support/update-from-tarballs.sh
 +++ b/src/api-support/update-from-tarballs.sh
 @@ -36,7 +36,7 @@ for t in $tarballs; do
  # x.y.z
  v=$(echo $p | sed 's/^libguestfs-//')
  
 -if [ $v != 1.2.0 -a $v != 1.3.0 -a ! -f $v ]; then
 +if [ $v != 1.2.0  $v != 1.3.0  ! -f $v ]; then
  rm -rf $tmpdir/*
  tar -C $tmpdir \
  -zxf $t $p/src/*.c 2/dev/null ||:
 diff --git a/sysprep/test-virt-sysprep-script.sh 
 b/sysprep/test-virt-sysprep-script.sh
 index 10ba1d1..65813d5 100755
 --- a/sysprep/test-virt-sysprep-script.sh
 +++ b/sysprep/test-virt-sysprep-script.sh
 @@ -37,7 +37,7 @@ if ! virt-sysprep -q -n -a ../tests/guests/fedora.img 
 --enable script \
  echo $0: virt-sysprep wasn't expected to exit with error.
  exit 1
  fi
 -if [ ! -f stamp-script1.sh -o ! -f stamp-script2.sh ]; then
 +if [ ! -f stamp-script1.sh || ! -f stamp-script2.sh ]; then
  echo $0: one of the two test scripts did not run.
  exit 1
  fi
 diff --git a/tests/qemu/qemu-snapshot-isolation.sh 
 b/tests/qemu/qemu-snapshot-isolation.sh
 index daa210f..31b3562 100755
 --- a/tests/qemu/qemu-snapshot-isolation.sh
 +++ b/tests/qemu/qemu-snapshot-isolation.sh
 @@ -98,7 +98,7 @@ fi
  if [ $(md5sum isolation2.img | awk '{print $1}') != $isolation2_md5sum 
 ]; then
  serious_error
  fi
 -if [ $supports_qcow2 = yes -a \
 +if [ $supports_qcow2 = yes  \
   $(md5sum isolation3.img | awk 

Re: [Libguestfs] [PATCH 08/13] syntax-check: fix prohibit_getopt_without_use check

2014-09-23 Thread Richard W.M. Jones
On Tue, Sep 23, 2014 at 05:20:34PM +0800, Hu Tao wrote:
 Signed-off-by: Hu Tao hu...@cn.fujitsu.com
 ---
  p2v/gui.c | 1 -
  1 file changed, 1 deletion(-)
 
 diff --git a/p2v/gui.c b/p2v/gui.c
 index 2df5017..dc6619a 100644
 --- a/p2v/gui.c
 +++ b/p2v/gui.c
 @@ -23,7 +23,6 @@
  #include string.h
  #include inttypes.h
  #include unistd.h
 -#include getopt.h
  #include fcntl.h
  #include errno.h
  #include locale.h
 -- 

ACK.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] [PATCH 00/13] syntax-check

2014-09-23 Thread Richard W.M. Jones
On Tue, Sep 23, 2014 at 04:00:34PM +0200, Pino Toscano wrote:
 - in case of unused includes, I'd say it should be fine to just remove
   them together in a single commit

Ah - I just pushed all the include patches :-)

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] Virt-v2v conversion issue

2014-09-23 Thread VONDRA Alain
Hi
Thank you for your quick response, do you know when the build 1.27.53 will be 
available ?
Alain




Alain VONDRA
Chargé d'exploitation des Systèmes d'Information
Direction Administrative et Financière
+33 1 44 39 77 76
UNICEF France
3 rue Duguay Trouin  75006 PARIS
www.unicef.fr




-Message d'origine-
De : Richard W.M. Jones [mailto:rjo...@redhat.com]
Envoyé : mardi 23 septembre 2014 11:44
À : VONDRA Alain
Cc : libguestfs@redhat.com
Objet : Re: [Libguestfs] Virt-v2v conversion issue

On Tue, Sep 23, 2014 at 08:50:13AM +, VONDRA Alain wrote:
 Hi,
 I am running virt-v2v under CentOS 7, I use the new libguestfs-1.27.48-1.1, 
 and when I try to import my Windows 2008 (running perfectly using 
 virt-manager) in my cloud oVirt, I encounter this issue :
 
 libguestfs: trace: mkdir_p = 0
 libguestfs: trace: case_sensitive_path /Windows/system32/drivers/viostor.sys
 libguestfs: trace: case_sensitive_path = 
 /Windows/System32/drivers/viostor.sys
 libguestfs: trace: cp 
 /usr/share/virtio-win/drivers/amd64/Win2008/viostor.sys 
 /Windows/System32/drivers/viostor.sys
 libguestfs: trace: cp = -1 (error)
 libguestfs: trace: hivex_close
 libguestfs: trace: hivex_close = 0
 virt-v2v: error: libguestfs error: cp: cp: cannot stat
 '/sysroot/usr/share/virtio-win/drivers/amd64/Win2008/viostor.sys': No
 such file or directory

This was fixed yesterday:

https://github.com/libguestfs/libguestfs/commit/7b428603e3a6dc43c48e276b192fda05a4a50a13

I've not got around to getting a build out which includes this fix, but it will 
be fixed in = 1.27.53.

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones 
Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top 
is 'top' for virtual machines.  Tiny program with many powerful monitoring 
features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] Virt-v2v conversion issue

2014-09-23 Thread Richard W.M. Jones
On Tue, Sep 23, 2014 at 03:46:33PM +, VONDRA Alain wrote:
 Hi
 Thank you for your quick response, do you know when the build 1.27.53 will be 
 available ?

Probably tomorrow if all goes well.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] [Qemu-devel] Why is virt-resize designed to involve two disks?

2014-09-23 Thread Eric Blake
On 09/23/2014 04:15 AM, 吴志勇 wrote:
 HI,

[please configure your mailer to wrap long lines]

 As you've known, vhd-util and qemu-img both provide the capacity for
resizing the original disk, but why is virt-resize designed to involve
two disks, not only original disk? Is there any concern? Is it possible
that only one original disk is involved in virt-resize?

virt-resize is part of libguestfs, and as such is not maintained on this
list.  You'll get better answers about why virt-resize does not support
in-place resizing by asking on that list.  But the answer probably
involves the fact that virt-resize is doing MUCH more than resizing the
block device - it is also copying entire filesystems from the old
location to the new resized location for optimal initial placement.

-- 
Eric Blake   eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature
___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] Virt-v2v conversion issue

2014-09-23 Thread Richard W.M. Jones
The 1.27.53 build is available now.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


[Libguestfs] Another possible bug in the preview version of virt-v2v for RHEL/CentOS 7.1

2014-09-23 Thread Jeff Forbes
I have been able to get a litle further with converting a windows VM.
After getting the updated virt-v2v code and rhsrvany, I now get this error:

libguestfs: trace: hivex_node_set_value = 0
libguestfs: trace: upload 
/usr/share/virtio-win/drivers/amd64/Win2012R2/netkvm.cat 
/Windows/Drivers/VirtIO
guestfsd: main_loop: proc 365 (hivex_node_set_value) took 0.01 seconds
guestfsd: main_loop: new request, len 0x44
guestfsd: receive_file: reading length word
libguestfs: got daemon cancellation
guestfsd: receive_file: got chunk: cancel = 0x1, len = 0, buf = (nil)
guestfsd: receive_file: received cancellation from library
guestfsd: error: /Windows/Drivers/VirtIO: Is a directory
libguestfs: trace: upload = -1 (error)
libguestfs: trace: hivex_close
guestfsd: main_loop: proc 66 (upload) took 0.03 seconds
guestfsd: main_loop: new request, len 0x28
hivex: hivex_close: hivex_close
guestfsd: main_loop: proc 351 (hivex_close) took 0.00 seconds
libguestfs: trace: hivex_close = 0
virt-v2v: error: libguestfs error: upload: /Windows/Drivers/VirtIO: Is a
directory



___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] [PATCH 00/13] syntax-check

2014-09-23 Thread Hu Tao
On Tue, Sep 23, 2014 at 04:00:34PM +0200, Pino Toscano wrote:
 Hi Hu,
 
 On Tuesday 23 September 2014 17:20:26 Hu Tao wrote:
  This series includes patches to make `make syntax-check` pass.
 
 Thanks for your work. I have few general notes about it:
 
 - please be more descriptive about each issue: just tell in the first
   line of the commit what is the actual change (like remove extra
   getopt.h includes), mentioning the check name in the long
   description. This way it is more clear what the change was about, also
   in case sometime in the future some of those checks is removed.
 
 - in case of unused includes, I'd say it should be fine to just remove
   them together in a single commit
 
 I'll comment on specific issues in each commit.

Thanks for review! I'm sorry to bring so much noise. I agree with Rich
it's better to remove syntax-check.

Regards,
Hu

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] Why is virt-resize designed to involve two disks?

2014-09-23 Thread Zhi Yong Wu
On Tue, Sep 23, 2014 at 8:11 PM, Richard W.M. Jones rjo...@redhat.com wrote:
 On Tue, Sep 23, 2014 at 06:19:21PM +0800, Zhi Yong Wu wrote:
 As you've known, vhd-util and qemu-img both provide the capacity for
 resizing the original disk,

 .. although they only resize the container, not the contents which is
 what virt-resize does.  So these tools are not really comparable.
Yes.

 but why is virt-resize designed to involve
 two disks, not only original disk? Is there any concern? Is it
 possible that only one original disk is involved in virt-resize?

 I'm guessing this question is why virt-resize doesn't work on disk
 images in-place.

 This I hope is answered in the FAQ here:

   
 http://libguestfs.org/guestfs-faq.1.html#why-doesnt-virt-resize-work-on-the-disk-image-in-place
It is really what i want, thanks.

 Rich.

 --
 Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
 Read my programming and virtualization blog: http://rwmj.wordpress.com
 virt-top is 'top' for virtual machines.  Tiny program with many
 powerful monitoring features, net stats, disk stats, logging, etc.
 http://people.redhat.com/~rjones/virt-top



-- 
Regards,

Zhi Yong Wu

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs