[Pkg-libvirt-commits] [libguestfs] 03/37: Imported Upstream version 1.15.2
Hilko Bengen
bengen at moszumanska.debian.org
Sun Dec 22 18:13:33 UTC 2013
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag debian/1%1.15.10-1
in repository libguestfs.
commit 25615d3d50e3b6383d79bfbac9fb2efa8b558c45
Author: Hilko Bengen <bengen at debian.org>
Date: Fri Nov 11 11:56:13 2011 +0100
Imported Upstream version 1.15.2
---
.gitignore | 2 +
BUGS | 5 +-
ChangeLog | 62 +++
Makefile.am | 5 +-
Makefile.in | 13 +-
README | 8 +-
align/Makefile.in | 1 -
appliance/Makefile.in | 1 -
capitests/Makefile.in | 1 -
cat/Makefile.in | 1 -
caution/Makefile.in | 1 -
clone/Makefile.in | 1 -
clone/test-virt-sysprep.sh | 5 -
clone/virt-sysprep.in | 16 +-
config.h.in | 3 +
configure | 145 ++++---
configure.ac | 27 +-
contrib/intro/libguestfs-intro.html | 106 +++++-
contrib/intro/talk.txt | 130 +++++++
csharp/Makefile.in | 1 -
daemon/Makefile.in | 1 -
debian/changelog | 4 +-
debian/control | 2 -
df/Makefile.in | 1 -
edit/Makefile.in | 1 -
erlang/Makefile.in | 1 -
erlang/examples/Makefile.in | 1 -
examples/Makefile.in | 1 -
fish/Makefile.in | 1 -
fuse/Makefile.in | 1 -
generator/Makefile.in | 1 -
generator/generator_bindtests.ml | 2 +-
generator/generator_python.ml | 130 ++++++-
gnulib/lib/Makefile.in | 1 -
gnulib/tests/Makefile.in | 1 -
haskell/Makefile.in | 1 -
images/Makefile.in | 1 -
inspector/Makefile.in | 1 -
inspector/virt-inspector.c | 124 ++++++
inspector/virt-inspector.pod | 29 +-
java/Makefile.in | 1 -
java/examples/Makefile.in | 1 -
libguestfs.pc | 2 +-
ocaml/Makefile.in | 1 -
ocaml/examples/Makefile.in | 1 -
perl/Makefile.in | 1 -
perl/examples/Makefile.in | 1 -
php/Makefile.in | 1 -
po-docs/Makefile.in | 1 -
po-docs/ja.po | 182 +++++----
po-docs/ja/Makefile.in | 1 -
po-docs/ja/guestfish.1 | 2 +-
po-docs/ja/guestfs.3 | 2 +-
po-docs/ja/guestmount.1 | 2 +-
po-docs/ja/libguestfs-test-tool.1 | 2 +-
po-docs/ja/virt-alignment-scan.1 | 2 +-
po-docs/ja/virt-cat.1 | 2 +-
po-docs/ja/virt-copy-in.1 | 2 +-
po-docs/ja/virt-copy-out.1 | 2 +-
po-docs/ja/virt-df.1 | 2 +-
po-docs/ja/virt-edit.1 | 2 +-
po-docs/ja/virt-filesystems.1 | 2 +-
po-docs/ja/virt-inspector.1 | 29 +-
po-docs/ja/virt-inspector.pod | 26 +-
po-docs/ja/virt-list-filesystems.1 | 2 +-
po-docs/ja/virt-list-partitions.1 | 2 +-
po-docs/ja/virt-ls.1 | 2 +-
po-docs/ja/virt-make-fs.1 | 2 +-
po-docs/ja/virt-rescue.1 | 2 +-
po-docs/ja/virt-resize.1 | 2 +-
po-docs/ja/virt-sparsify.1 | 2 +-
po-docs/ja/virt-sysprep.1 | 2 +-
po-docs/ja/virt-tar-in.1 | 2 +-
po-docs/ja/virt-tar-out.1 | 2 +-
po-docs/ja/virt-tar.1 | 2 +-
po-docs/ja/virt-win-reg.1 | 2 +-
po-docs/libguestfs-docs.pot | 184 +++++----
po-docs/uk.po | 184 +++++----
po-docs/uk/Makefile.in | 1 -
po-docs/uk/guestfish.1 | 2 +-
po-docs/uk/guestfs.3 | 2 +-
po-docs/uk/guestmount.1 | 2 +-
po-docs/uk/libguestfs-test-tool.1 | 2 +-
po-docs/uk/virt-alignment-scan.1 | 2 +-
po-docs/uk/virt-cat.1 | 2 +-
po-docs/uk/virt-copy-in.1 | 2 +-
po-docs/uk/virt-copy-out.1 | 2 +-
po-docs/uk/virt-df.1 | 2 +-
po-docs/uk/virt-edit.1 | 2 +-
po-docs/uk/virt-filesystems.1 | 2 +-
po-docs/uk/virt-inspector.1 | 29 +-
po-docs/uk/virt-inspector.pod | 26 +-
po-docs/uk/virt-list-filesystems.1 | 2 +-
po-docs/uk/virt-list-partitions.1 | 2 +-
po-docs/uk/virt-ls.1 | 2 +-
po-docs/uk/virt-make-fs.1 | 2 +-
po-docs/uk/virt-rescue.1 | 2 +-
po-docs/uk/virt-resize.1 | 2 +-
po-docs/uk/virt-sparsify.1 | 2 +-
po-docs/uk/virt-sysprep.1 | 2 +-
po-docs/uk/virt-tar-in.1 | 2 +-
po-docs/uk/virt-tar-out.1 | 2 +-
po-docs/uk/virt-tar.1 | 2 +-
po-docs/uk/virt-win-reg.1 | 2 +-
po/en_GB.gmo | Bin 10781 -> 10781 bytes
po/en_GB.po | 78 +++-
po/es.gmo | Bin 94335 -> 92709 bytes
po/es.po | 61 ++-
po/gu.gmo | Bin 53605 -> 53605 bytes
po/gu.po | 59 ++-
po/hi.gmo | Bin 43389 -> 43389 bytes
po/hi.po | 59 ++-
po/kn.gmo | Bin 52822 -> 52822 bytes
po/kn.po | 59 ++-
po/libguestfs.pot | 61 ++-
po/ml.gmo | Bin 56355 -> 56355 bytes
po/ml.po | 59 ++-
po/mr.gmo | Bin 107083 -> 104937 bytes
po/mr.po | 61 ++-
po/nl.gmo | Bin 92463 -> 90946 bytes
po/nl.po | 61 ++-
po/or.gmo | Bin 52173 -> 52173 bytes
po/or.po | 59 ++-
po/pa.gmo | Bin 92358 -> 90834 bytes
po/pa.po | 61 ++-
po/pl.gmo | Bin 96999 -> 95389 bytes
po/pl.po | 62 ++-
po/ta.gmo | Bin 47311 -> 47311 bytes
po/ta.po | 59 ++-
po/te.gmo | Bin 49970 -> 49970 bytes
po/te.po | 59 ++-
po/uk.gmo | Bin 127156 -> 125123 bytes
po/uk.po | 61 ++-
python/Makefile.am | 5 +-
python/Makefile.in | 6 +-
python/bindtests.py | 2 +-
python/examples/Makefile.in | 1 -
python/guestfs-py-byhand.c | 2 +-
python/guestfs-py.c | 594 +++++++++++++++++++++++++----
python/guestfs.py | 738 ++++++++++++++++++------------------
python/run-bindtests | 4 +-
python/run-python-tests | 4 +-
regressions/Makefile.in | 1 -
rescue/Makefile.in | 1 -
resize/.depend | 2 +
resize/Makefile.am | 15 +-
resize/Makefile.in | 138 +++----
resize/utils.ml | 23 +-
resize/utils_tests.ml | 87 +++++
ruby/Makefile.in | 1 -
ruby/examples/Makefile.in | 1 -
sparsify/Makefile.in | 1 -
src/Makefile.in | 1 -
test-tool/Makefile.in | 1 -
tools/Makefile.in | 1 -
155 files changed, 2966 insertions(+), 1185 deletions(-)
diff --git a/.gitignore b/.gitignore
index 8980fd0..d8f4628 100644
--- a/.gitignore
+++ b/.gitignore
@@ -295,6 +295,7 @@ po-docs/*/*.pod
po-docs/*/*.1
po-docs/*/*.3
podwrapper.sh
+python/__pycache__
python/bindtests.py
python/examples/guestfs-python.3
python/examples/stamp-guestfs-python.pod
@@ -310,6 +311,7 @@ rescue/stamp-virt-rescue.pod
rescue/virt-rescue
rescue/virt-rescue.1
resize/stamp-virt-resize.pod
+resize/utils_tests
resize/virt-resize
resize/virt-resize.1
ruby/bindtests.rb
diff --git a/BUGS b/BUGS
index 4eac2fc..f14dd81 100644
--- a/BUGS
+++ b/BUGS
@@ -1,5 +1,5 @@
NOTE: This file is automatically generated from "update-bugs.sh".
-Last updated: 2011-11-01
+Last updated: 2011-11-03
This contains a local list of the bugs that are open against
libguestfs. Bugs are tracked in the Red Hat Bugzilla database
@@ -171,6 +171,9 @@ You can help by testing the fixes.
691389 MODIFIED https://bugzilla.redhat.com/show_bug.cgi?id=691389
Extended attributes don't work over guestmount (FUSE)
+750889 MODIFIED https://bugzilla.redhat.com/show_bug.cgi?id=750889
+ Python code incompatible with Python v3.
+
657499 MODIFIED https://bugzilla.redhat.com/show_bug.cgi?id=657499
checksum: wrong check sum type causes umount to fail
diff --git a/ChangeLog b/ChangeLog
index ad2b87b..7d165eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,67 @@
+2011-11-03 Richard W.M. Jones <rjones at redhat.com>
+
+ virt-sysprep: Don't use xmlstarlet.
+ Use virt-inspector --xpath option instead.
+
+ Add virt-inspector --xpath to run XPath queries directly.
+ xmlstarlet is good, but not available in Red Hat Enterprise Linux.
+
+ Build a simple but sane XPath query parser into virt-inspector
+ directly so that we don't need any external tools.
+
+ resize: Remove requirement for ocaml Pcre library.
+ This library is not available in RHEL 6, and in any case removing the
+ dependency is a simple change.
+
+ resize: Add tests for some Utils functions.
+
+ python: Use sys.version_info[0] instead of sys.version_info.major.
+ The major/minor fields only exist in Python >= 2.7. This works for at
+ least Python 2.5 and 2.6.
+
+ Thanks to Hilko Bengen.
+
+ This updates commit 646142f5136da9cfe2b908703a822c53350f70e9.
+
+2011-11-02 Richard W.M. Jones <rjones at redhat.com>
+
+ python: Fixes for Python 3 (RHBZ#750889).
+ These fixes allow libguestfs bindings to work with Python 3 (tested
+ with Python 3.2)
+
+ You can select which Python you compile against by doing:
+
+ PYTHON=python ./configure && make && make check
+
+ or:
+
+ PYTHON=python3 ./configure && make && make check
+
+ python: Pass $PYTHON environment variable to tests.
+ If the user set PYTHON when configuring, this variable is not passed
+ through to the tests, so it is possible the tests will fail because
+ they are testing the wrong version of python. By passing $PYTHON
+ through to the tests we ensure that we test against the same version
+ of python that we configured with.
+
+ python: Include <config.h>.
+ Ooops ...
+
+ python: Correctly check for Python major/minor.
+ The manual for sys.version warns that you should not parse the string,
+ which we were doing. It would have failed on python "2.10" or
+ similar.
+
+ Do it correctly using the sys.version_info struct instead.
+
+ contrib: Use PNG images as fallback for IE compatibility.
+
2011-11-01 Richard W.M. Jones <rjones at redhat.com>
+ contrib: Update talk.
+
+ Version 1.15.1.
+
contrib: Add all contrib files to EXTRA_DIST.
contrib: Add libguestfs talk.
diff --git a/Makefile.am b/Makefile.am
index a7038f3..60343f8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -69,10 +69,7 @@ SUBDIRS += csharp
# virt-resize (new version) and virt-sparsify are written in OCaml.
if HAVE_OCAML
-if HAVE_OCAML_PCRE
-SUBDIRS += resize
-endif
-SUBDIRS += sparsify
+SUBDIRS += resize sparsify
endif
# Perl tools.
diff --git a/Makefile.in b/Makefile.in
index c90c4ca..0a19366 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -91,19 +91,18 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
@HAVE_ERLANG_TRUE at am__append_10 = erlang erlang/examples
# virt-resize (new version) and virt-sparsify are written in OCaml.
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at am__append_11 = resize
- at HAVE_OCAML_TRUE@am__append_12 = sparsify
+ at HAVE_OCAML_TRUE@am__append_11 = resize sparsify
# Perl tools.
- at HAVE_TOOLS_TRUE@am__append_13 = tools
+ at HAVE_TOOLS_TRUE@am__append_12 = tools
# guestmount
# virt-tools in shell. This uses guestmount and virt-inspector.
- at HAVE_FUSE_TRUE@am__append_14 = fuse clone
+ at HAVE_FUSE_TRUE@am__append_13 = fuse clone
# po-docs must come after tools, inspector.
- at HAVE_PO4A_TRUE@am__append_15 = po-docs
+ at HAVE_PO4A_TRUE@am__append_14 = po-docs
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
@@ -1041,7 +1040,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -1323,8 +1321,7 @@ SUBDIRS = gnulib/lib images generator src examples po $(am__append_1) \
$(am__append_3) $(am__append_4) $(am__append_5) \
$(am__append_6) $(am__append_7) $(am__append_8) \
$(am__append_9) $(am__append_10) csharp $(am__append_11) \
- $(am__append_12) $(am__append_13) $(am__append_14) \
- $(am__append_15)
+ $(am__append_12) $(am__append_13) $(am__append_14)
EXTRA_DIST = \
$(generator_built) \
BUGS HACKING RELEASE-NOTES ROADMAP TODO \
diff --git a/README b/README
index 9d18eeb..2af85cf 100644
--- a/README
+++ b/README
@@ -101,10 +101,6 @@ To build FUSE support (guestmount):
- FUSE libraries and kernel module (optional)
-To build virt-resize:
-
-- OCaml PCRE bindings (ocaml-pcre) (optional)
-
To build language bindings:
- Perl if you want to build the perl bindings (optional)
@@ -136,9 +132,7 @@ To build the Perl tools:
To run virt-sysprep:
-- xmlstarlet (optional)
-
-- virt-sysprep also requires FUSE support since it uses guestmount
+- virt-sysprep requires FUSE support since it uses guestmount
Building
diff --git a/align/Makefile.in b/align/Makefile.in
index 913a817..97195b8 100644
--- a/align/Makefile.in
+++ b/align/Makefile.in
@@ -996,7 +996,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/appliance/Makefile.in b/appliance/Makefile.in
index 0c7ccd5..9e09fab 100644
--- a/appliance/Makefile.in
+++ b/appliance/Makefile.in
@@ -949,7 +949,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/capitests/Makefile.in b/capitests/Makefile.in
index 206539c..220eb44 100644
--- a/capitests/Makefile.in
+++ b/capitests/Makefile.in
@@ -1045,7 +1045,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/cat/Makefile.in b/cat/Makefile.in
index cc4fae2..c8da507 100644
--- a/cat/Makefile.in
+++ b/cat/Makefile.in
@@ -1020,7 +1020,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/caution/Makefile.in b/caution/Makefile.in
index c18fec3..2f39f5b 100644
--- a/caution/Makefile.in
+++ b/caution/Makefile.in
@@ -932,7 +932,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/clone/Makefile.in b/clone/Makefile.in
index feba17d..42f4baf 100644
--- a/clone/Makefile.in
+++ b/clone/Makefile.in
@@ -956,7 +956,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/clone/test-virt-sysprep.sh b/clone/test-virt-sysprep.sh
index 81e01f8..097f416 100755
--- a/clone/test-virt-sysprep.sh
+++ b/clone/test-virt-sysprep.sh
@@ -24,11 +24,6 @@ if [ ! -w /dev/fuse ]; then
exit 0
fi
-if ! xmlstarlet --help >/dev/null 2>&1; then
- echo "SKIPPING virt-sysprep test, because xmlstarlet is not installed."
- exit 0
-fi
-
rm -f test.img guestfish
qemu-img create -f qcow2 -o backing_file=../images/fedora.img test.img
diff --git a/clone/virt-sysprep.in b/clone/virt-sysprep.in
index 144bad4..9150872 100644
--- a/clone/virt-sysprep.in
+++ b/clone/virt-sysprep.in
@@ -222,18 +222,18 @@ trap cleanup EXIT ERR
# Run virt-inspector and grab inspection information about this guest.
virt-inspector "${params[@]}" > $tmpdir/xml
-xmlstarlet sel -t -c \
+virt-inspector --xpath \
"string(/operatingsystems/operatingsystem[position()=1]/name)" \
- $tmpdir/xml > $tmpdir/type
-xmlstarlet sel -t -c \
+ < $tmpdir/xml > $tmpdir/type
+virt-inspector --xpath \
"string(/operatingsystems/operatingsystem[position()=1]/distro)" \
- $tmpdir/xml > $tmpdir/distro ||:
-xmlstarlet sel -t -c \
+ < $tmpdir/xml > $tmpdir/distro ||:
+virt-inspector --xpath \
"string(/operatingsystems/operatingsystem[position()=1]/package_format)" \
- $tmpdir/xml > $tmpdir/package_format ||:
-xmlstarlet sel -t -c \
+ < $tmpdir/xml > $tmpdir/package_format ||:
+virt-inspector --xpath \
"string(/operatingsystems/operatingsystem[position()=1]/package_management)" \
- $tmpdir/xml > $tmpdir/package_management ||:
+ < $tmpdir/xml > $tmpdir/package_management ||:
type="$(cat $tmpdir/type)"
distro="$(cat $tmpdir/distro)"
diff --git a/config.h.in b/config.h.in
index 6f8080b..475e86e 100644
--- a/config.h.in
+++ b/config.h.in
@@ -981,6 +981,9 @@
/* Define to 1 if you have the `PyCapsule_New' function. */
#undef HAVE_PYCAPSULE_NEW
+/* Define to 1 if you have the `PyString_AsString' function. */
+#undef HAVE_PYSTRING_ASSTRING
+
/* Define to 1 if you have the `raise' function. */
#undef HAVE_RAISE
diff --git a/configure b/configure
index ac47865..1aeb467 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for libguestfs 1.15.1.
+# Generated by GNU Autoconf 2.68 for libguestfs 1.15.2.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libguestfs'
PACKAGE_TARNAME='libguestfs'
-PACKAGE_VERSION='1.15.1'
-PACKAGE_STRING='libguestfs 1.15.1'
+PACKAGE_VERSION='1.15.2'
+PACKAGE_STRING='libguestfs 1.15.2'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -669,11 +669,8 @@ HAVE_PERL_TRUE
PERL
HAVE_OCAMLDOC_FALSE
HAVE_OCAMLDOC_TRUE
-HAVE_OCAML_PCRE_FALSE
-HAVE_OCAML_PCRE_TRUE
HAVE_OCAML_FALSE
HAVE_OCAML_TRUE
-OCAML_PKG_pcre
OCAMLFIND
OCAMLBUILD
OCAMLDOC
@@ -2282,7 +2279,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libguestfs 1.15.1 to adapt to many kinds of systems.
+\`configure' configures libguestfs 1.15.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -2352,7 +2349,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libguestfs 1.15.1:";;
+ short | recursive ) echo "Configuration of libguestfs 1.15.2:";;
esac
cat <<\_ACEOF
@@ -2522,7 +2519,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libguestfs configure 1.15.1
+libguestfs configure 1.15.2
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -3264,7 +3261,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libguestfs $as_me 1.15.1, which was
+It was created by libguestfs $as_me 1.15.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -4171,7 +4168,7 @@ fi
# Define the identity of the package.
PACKAGE='libguestfs'
- VERSION='1.15.1'
+ VERSION='1.15.2'
cat >>confdefs.h <<_ACEOF
@@ -4268,8 +4265,8 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: libguestfs version 1.15.1$libguestfs_extra" >&5
-$as_echo "$as_me: libguestfs version 1.15.1$libguestfs_extra" >&6;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: libguestfs version 1.15.2$libguestfs_extra" >&5
+$as_echo "$as_me: libguestfs version 1.15.2$libguestfs_extra" >&6;}
$as_echo "#define PACKAGE_VERSION_MAJOR 1" >>confdefs.h
@@ -4278,7 +4275,7 @@ $as_echo "#define PACKAGE_VERSION_MAJOR 1" >>confdefs.h
$as_echo "#define PACKAGE_VERSION_MINOR 15" >>confdefs.h
-$as_echo "#define PACKAGE_VERSION_RELEASE 1" >>confdefs.h
+$as_echo "#define PACKAGE_VERSION_RELEASE 2" >>confdefs.h
cat >>confdefs.h <<_ACEOF
@@ -51125,33 +51122,6 @@ fi
- if test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package pcre" >&5
-$as_echo_n "checking for OCaml findlib package pcre... " >&6; }
-
- unset found
- unset pkg
- found=no
- for pkg in pcre ; do
- if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
-$as_echo "found" >&6; }
- OCAML_PKG_pcre=$pkg
- found=yes
- break
- fi
- done
- if test "$found" = "no" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- OCAML_PKG_pcre=no
- fi
-
-
-
-fi
-
fi
if test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno"; then
HAVE_OCAML_TRUE=
@@ -51161,14 +51131,6 @@ else
HAVE_OCAML_FALSE=
fi
- if test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno" && test "x$OCAML_PKG_pcre" != "xno"; then
- HAVE_OCAML_PCRE_TRUE=
- HAVE_OCAML_PCRE_FALSE='#'
-else
- HAVE_OCAML_PCRE_TRUE='#'
- HAVE_OCAML_PCRE_FALSE=
-fi
-
if test "x$OCAMLDOC" != "xno"; then
HAVE_OCAMLDOC_TRUE=
HAVE_OCAMLDOC_FALSE='#'
@@ -51318,7 +51280,9 @@ $as_echo "$PYTHON_PREFIX" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
$as_echo_n "checking Python version... " >&6; }
- PYTHON_VERSION=`$PYTHON -c "import sys; print (sys.version[0:3])"`
+ PYTHON_VERSION_MAJOR=`$PYTHON -c "import sys; print (sys.version_info[0])"`
+ PYTHON_VERSION_MINOR=`$PYTHON -c "import sys; print (sys.version_info[1])"`
+ PYTHON_VERSION="$PYTHON_VERSION_MAJOR.$PYTHON_VERSION_MINOR"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_VERSION" >&5
$as_echo "$PYTHON_VERSION" >&6; }
@@ -51355,14 +51319,73 @@ $as_echo_n "checking for Python site-packages path... " >&6; }
$as_echo "$PYTHON_INSTALLDIR" >&6; }
fi
- old_LIBS="$LIBS"
- LIBS="$LIBS -lpython$PYTHON_VERSION"
- for ac_func in PyCapsule_New
+ old_LIBS="$LIBS"
+ if test "x$PYTHON_VERSION_MAJOR" = "x3"; then
+ LIBPYTHON="python${PYTHON_VERSION}mu"
+ else
+ LIBPYTHON="python$PYTHON_VERSION"
+ fi
+ as_ac_Lib=`$as_echo "ac_cv_lib_$LIBPYTHON''_PyList_Size" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PyList_Size in -l$LIBPYTHON" >&5
+$as_echo_n "checking for PyList_Size in -l$LIBPYTHON... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$LIBPYTHON $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char PyList_Size ();
+int
+main ()
+{
+return PyList_Size ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$as_ac_Lib=yes"
+else
+ eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_LIB$LIBPYTHON" | $as_tr_cpp` 1
+_ACEOF
+
+ LIBS="-l$LIBPYTHON $LIBS"
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "$LIBPYTHON is not installed
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+
+ for ac_func in PyCapsule_New \
+ PyString_AsString
do :
- ac_fn_c_check_func "$LINENO" "PyCapsule_New" "ac_cv_func_PyCapsule_New"
-if test "x$ac_cv_func_PyCapsule_New" = xyes; then :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_PYCAPSULE_NEW 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
@@ -52704,10 +52727,6 @@ if test -z "${HAVE_OCAML_TRUE}" && test -z "${HAVE_OCAML_FALSE}"; then
as_fn_error $? "conditional \"HAVE_OCAML\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${HAVE_OCAML_PCRE_TRUE}" && test -z "${HAVE_OCAML_PCRE_FALSE}"; then
- as_fn_error $? "conditional \"HAVE_OCAML_PCRE\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
if test -z "${HAVE_OCAMLDOC_TRUE}" && test -z "${HAVE_OCAMLDOC_FALSE}"; then
as_fn_error $? "conditional \"HAVE_OCAMLDOC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -53153,7 +53172,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libguestfs $as_me 1.15.1, which was
+This file was extended by libguestfs $as_me 1.15.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -53223,7 +53242,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-libguestfs config.status 1.15.1
+libguestfs config.status 1.15.2
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
@@ -55232,7 +55251,7 @@ echo "guestfish and C virt tools .......... yes"
echo -n "Perl virt tools ..................... "
if test "x$HAVE_TOOLS_TRUE" = "x"; then echo "yes"; else echo "no"; fi
echo -n "virt-resize ......................... "
-if test "x$HAVE_OCAML_TRUE" = "x" && test "x$HAVE_OCAML_PCRE_TRUE" = "x"; then echo "yes"; else echo "no"; fi
+if test "x$HAVE_OCAML_TRUE" = "x"; then echo "yes"; else echo "no"; fi
echo "FUSE filesystem ..................... $enable_fuse"
echo
echo "If any optional component is configured 'no' when you expected 'yes'"
diff --git a/configure.ac b/configure.ac
index 7a19e33..0f09c3d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@
# freeform string.
m4_define([libguestfs_major], [1])
m4_define([libguestfs_minor], [15])
-m4_define([libguestfs_release], [1])
+m4_define([libguestfs_release], [2])
AC_INIT([libguestfs],libguestfs_major.libguestfs_minor.libguestfs_release)
AC_CONFIG_AUX_DIR([build-aux])
@@ -652,14 +652,9 @@ AS_IF([test "x$enable_ocaml" != "xno"],
OCAMLFIND=
AC_PROG_OCAML
AC_PROG_FINDLIB
-
- AS_IF([test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno"],
- [AC_CHECK_OCAML_PKG([pcre])])
])
AM_CONDITIONAL([HAVE_OCAML],
[test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno"])
-AM_CONDITIONAL([HAVE_OCAML_PCRE],
- [test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno" && test "x$OCAML_PKG_pcre" != "xno"])
AM_CONDITIONAL([HAVE_OCAMLDOC],
[test "x$OCAMLDOC" != "xno"])
@@ -713,7 +708,9 @@ AS_IF([test "x$enable_python" != "xno"],
AC_MSG_RESULT([$PYTHON_PREFIX])
AC_MSG_CHECKING([Python version])
- PYTHON_VERSION=`$PYTHON -c "import sys; print (sys.version[[0:3]])"`
+ PYTHON_VERSION_MAJOR=`$PYTHON -c "import sys; print (sys.version_info@<:@0@:>@)"`
+ PYTHON_VERSION_MINOR=`$PYTHON -c "import sys; print (sys.version_info@<:@1@:>@)"`
+ PYTHON_VERSION="$PYTHON_VERSION_MAJOR.$PYTHON_VERSION_MINOR"
AC_MSG_RESULT([$PYTHON_VERSION])
AC_MSG_CHECKING([for Python include path])
@@ -741,9 +738,19 @@ AS_IF([test "x$enable_python" != "xno"],
AC_MSG_RESULT([$PYTHON_INSTALLDIR])
fi
+ dnl Look for libpython and some optional symbols in it.
old_LIBS="$LIBS"
- LIBS="$LIBS -lpython$PYTHON_VERSION"
- AC_CHECK_FUNCS([PyCapsule_New])
+ if test "x$PYTHON_VERSION_MAJOR" = "x3"; then
+ dnl libpython3 is called "libpython3.Xmu.so"
+ LIBPYTHON="python${PYTHON_VERSION}mu"
+ else
+ LIBPYTHON="python$PYTHON_VERSION"
+ fi
+ AC_CHECK_LIB([$LIBPYTHON], [PyList_Size], [],
+ [AC_MSG_FAILURE([$LIBPYTHON is not installed])])
+
+ AC_CHECK_FUNCS([PyCapsule_New \
+ PyString_AsString])
LIBS="$old_LIBS"
fi
@@ -1076,7 +1083,7 @@ echo "guestfish and C virt tools .......... yes"
echo -n "Perl virt tools ..................... "
if test "x$HAVE_TOOLS_TRUE" = "x"; then echo "yes"; else echo "no"; fi
echo -n "virt-resize ......................... "
-if test "x$HAVE_OCAML_TRUE" = "x" && test "x$HAVE_OCAML_PCRE_TRUE" = "x"; then echo "yes"; else echo "no"; fi
+if test "x$HAVE_OCAML_TRUE" = "x"; then echo "yes"; else echo "no"; fi
echo "FUSE filesystem ..................... $enable_fuse"
echo
echo "If any optional component is configured 'no' when you expected 'yes'"
diff --git a/contrib/intro/libguestfs-intro.html b/contrib/intro/libguestfs-intro.html
index cfc7b8b..67bdf9b 100644
--- a/contrib/intro/libguestfs-intro.html
+++ b/contrib/intro/libguestfs-intro.html
@@ -1,4 +1,5 @@
-<html>
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<title>Short introduction to libguestfs</title>
@@ -7,7 +8,7 @@
counter-reset: chapter;
}
- body p {
+ body > p, body > img, body > pre, body > table {
margin-left: 2em;
}
@@ -26,8 +27,7 @@
}
h2 {
- background-color: #f3f3f3;
- margin-top: 2em;
+ margin-top: 4em;
color: rgb(204,0,0);
counter-increment: chapter;
counter-reset: section;
@@ -35,20 +35,20 @@
h2:before {
font-size: 80%;
color: #666;
- content: counter(chapter) " — ";
+ content: counter(chapter) " ... ";
}
pre {
background-color: #fcfcfc;
- border-top: 1px dotted #888;
- border-bottom: 1px dotted #888;
- border-left: 6px solid rgb(204,0,0);
+ border-top: 1px dotted #eee;
+ border-bottom: 1px dotted #eee;
+ border-left: 2px solid rgb(204,0,0);
padding: 5px;
margin-left: 1em;
}
p.sourcelnk {
- text-align: right;
+ text-align: left;
font-size: 70%;
}
</style>
@@ -62,7 +62,9 @@
<p><b>Reuse qemu, Linux kernel and userspace tools</b> to read and
write disk images.</p>
- <img src="overview.svg"/>
+ <object type="image/svg+xml" data="overview.svg">
+ <img src="overview.png"/> <!-- fallback for lame IE -->
+ </object>
<h2>The Stable API</h2>
@@ -89,7 +91,7 @@ free (fstype);
<table width="100%">
<tr><td valign="top">
-<pre style="font-size: 80%;">
+<pre>
("<b>vfs_type</b>",
(RString "fstype",
[Device "device"], []),
@@ -110,7 +112,7 @@ For example a string such as C<ext3> or C<ntfs>.");
</td>
<td valign="top">
-<pre style="font-size: 80%;">
+<pre>
char *
<b>do_vfs_type</b> (const char *device)
{
@@ -172,10 +174,12 @@ get_blkid_tag (const char *device, const char *tag)
<h2>Tools written around the API</h2>
- <img src="tools.svg" />
+ <object type="image/svg+xml" data="tools.svg">
+ <img src="tools.png"/> <!-- fallback for lame IE -->
+ </object>
<table>
- <tr><td valign="top">
+ <tr><td valign="top" style="padding-bottom: 1.5em;">
<pre>
<b>guestfish -N fs -m /dev/sda1 <<EOF</b>
<font style="color: green;">mkdir /etc
@@ -212,6 +216,80 @@ F15x32:/dev/vg_f15x32/lv_root 5.5G 3.4G 1.8G 63%
<h2>Inspection</h2>
+<pre>
+$ <b>virt-inspector -c qemu:///system -d Win7x32</b>
+
+<font style="color: #888;"><?xml version="1.0"?></font>
+<font style="color: #888;"><operatingsystems></font>
+ <font style="color: #888;"><operatingsystem></font>
+ <font style="color: #888;"><root></font>/dev/sda2<font style="color: #888;"></root></font>
+ <font style="color: #888;"><name></font>windows<font style="color: #888;"></name></font>
+ <font style="color: #888;"><arch></font>i386<font style="color: #888;"></arch></font>
+ <font style="color: #888;"><distro></font>windows<font style="color: #888;"></distro></font>
+ <font style="color: #888;"><product_name></font>Windows 7 Enterprise<font style="color: #888;"></product_name></font>
+ <font style="color: #888;"><product_variant></font>Client<font style="color: #888;"></product_variant></font>
+ <font style="color: #888;"><major_version></font>6<font style="color: #888;"></major_version></font>
+ <font style="color: #888;"><minor_version></font>1<font style="color: #888;"></minor_version></font>
+ <font style="color: #888;"><windows_systemroot></font>/Windows<font style="color: #888;"></windows_systemroot></font>
+ <font style="color: #888;"><windows_current_control_set></font>ControlSet001<font style="color: #888;"></windows_current_control_set></font>
+ <font style="color: #888;"><hostname></font>win7x32<font style="color: #888;"></hostname></font>
+<i>... etc ...</i>
+</pre>
+<p class="sourcelnk"><a href="win7.xml">full XML ...</a></p>
+
+ <table>
+ <tr><td colspan="2" align="middle">
+ <small><i>Click to enlarge the images</i></small>
+ </td></tr>
+ <tr><td width="50%">
+ <a href="virt-manager.png"><img src="virt-manager-t.png"></a>
+ </td><td width="50%" align="middle" valign="top">
+ <a href="vmm-icons.png"><img src="vmm-icons-t.png"></a>
+ </td></tr>
+ </table>
+
+<pre>
+ char **roots;
+ size_t i;
+ char *type, *distro, *product_name;
+ int major, minor;
+
+ roots = <b>guestfs_inspect_os</b> (g);
+
+ if (roots == NULL)
+ exit (EXIT_FAILURE);
+
+ if (roots[0] == NULL) {
+ fprintf (stderr, "no operating systems found\n");
+ exit (EXIT_FAILURE);
+ }
+
+ for (i = 0; roots[i] != NULL; ++i) {
+ type = <b>guestfs_inspect_get_type</b> (g, roots[i]);
+ distro = <b>guestfs_inspect_get_distro</b> (g, roots[i]);
+ product_name = <b>guestfs_inspect_get_product_name</b> (g, roots[i]);
+ major = <b>guestfs_inspect_get_major_version</b> (g, roots[i]);
+ minor = <b>guestfs_inspect_get_minor_version</b> (g, roots[i]);
+
+ printf ("Root: %s\n"
+ " Type: %s\n"
+ " Distro: %s\n"
+ " Version: %d.%d\n"
+ " Product name: %s\n\n");
+ roots[i],
+ type ? : "unknown", distro ? : "unknown", major, minor,
+ product_name ? : "");
+
+ free (type);
+ free (distro);
+ free (product_name);
+ free (roots[i]);
+ }
+
+ free (roots);
+</pre>
+<p class="sourcelnk"><a href="http://git.annexia.org/?p=libguestfs.git;a=blob;f=rescue/virt-rescue.c;h=0c0036460434f1365d9591d6b2b805d999b07056;hb=HEAD#l351">full source ...</a></p>
+
diff --git a/contrib/intro/talk.txt b/contrib/intro/talk.txt
index a8632f6..d28bcc4 100644
--- a/contrib/intro/talk.txt
+++ b/contrib/intro/talk.txt
@@ -5,3 +5,133 @@ distributed before the talk.
----------------------------------------------------------------------
+[1 The Idea]
+
+The "big idea" behind libguestfs is to read and write disk
+images by reusing all the qemu, Linux kernel and userspace
+code.
+
+This gives us tremendous power in a relatively small
+library: we can handle all Linux filesystems, all Windows
+filesystems, LVM, BSD, containers like raw and qcow, CD ISOs,
+USB keys, regular hard disks, and lots more.
+
+If you give us a btrfs filesystem in a BSD partition wrapped
+in a qcow2 file -- that is something we can handle.
+
+libguestfs -- as the name suggests -- is a plain, ordinary
+shared library written in C that you can link to C programs.
+You're all very smart people and you will have guessed
+already that we don't in fact run qemu as a library inside
+libguestfs as this diagram suggests. Instead we fork
+qemu or KVM, running a small "appliance" which has
+the usual kernel, a small Linux distribution with tools
+like mkfs, lvcreate and parted, and a libguestfs daemon.
+The library and the daemon talk to each other over a
+virtio-serial connection.
+
+The qemu instance is connected to the disks we are
+examining using the ordinary qemu -drive option.
+
+[2 The Stable API]
+
+Consider how you might send commands to the daemon.
+Example: Create a filesystem (mkfs).
+
+One thing you might do is to send shell commands over
+the virtio-serial connection. It would send "mkfs -t ..."
+
+This is something that is possible using the libguestfs
+API, but we don't encourage it. There are three reasons
+why we don't encourage and support this: one is that
+because we're calling this from a C program, it's hard
+to construct shell commands and deal with quoting issues.
+Secondly it's hard to parse the result from commands
+(think about parted or lvs which are two commands that
+produce quite complex output that is hard to parse).
+Thirdly the command line isn't very long-term stable,
+with some commands appearing and changing over time.
+
+I'd emphasize again that we do let you send shell
+commands over to the daemon if that's what you want to do.
+
+What we support, though, is a long-term stable API and ABI.
+It's slightly (but not very much) higher level than shell
+commands.
+
+I've got an example on the page. This is the guestfs_vfs_type
+API which returns the name of the filesystem on a device.
+
+Like libvirt, we are serious about the long term stability
+of the API and ABI, and if you write your program against
+this API, you'll never have to change the program or even
+recompile it.
+
+Because there are 100s of commands that you might want to
+run, we made it exceptionally simple to add new APIs.
+Shown below is the actual code used to implement "vfs-type".
+
+On the right is the code fragment that runs in the daemon.
+This is a short C function which handles constructing the
+command line and parsing out the result. Although there
+is parsing code here, the good thing is that it only exists
+in one place, and we can update it from time to time if
+the underlying shell commands change.
+
+On the left is the metadata for this API function. It
+has a description of the parameters and return value,
+some tests (not shown), and a fragment of documentation.
+
+That's ALL you have to write. From that, we generate
+header files, bindings in all the different languages,
+RPC for the virtio-serial connection, documentation, etc.
+Currently we generate about a quarter of a million lines
+of code and documentation.
+
+[3 Tools written around the API]
+
+Around this stable API, myself and the libguestfs team
+have written a number of tools. There are also people
+in the community writing other tools.
+
+A few of them are shown on this diagram, in fact there
+are many more than are shown here.
+
+Starting at the top, "guestfish" is a shell for the API,
+letting you write simple shell scripts. If you look at
+the code examples below, you can see a small guestfish
+script that creates a new raw format partitioned filesystem
+with some content.
+
+Going round clockwise:
+
+The libguestfs API is a mix of high-level calls like
+mkfs, lvremove, vfs-type; and also low level POSIX calls
+like mkdir and writing to files.
+"guestmount" lets you mount an existing filesystem from
+a guest and access it as a regular mountpoint on the host.
+guestmount intelligently caches and prefetches data so it's
+quite usable and fast from the command line or graphical
+programs like the GNOME Nautilus file browser.
+
+"virt-rescue" lets you use the appliance directly, and
+it's a useful way to rescue guests by hand.
+You just want to hammer out some shell commands manually.
+
+"virt-win-reg" lets you read and write Windows Registry
+entries. There is a rather complex example below right.
+
+Now we come round to the "inspection" tools, and these
+three tools let you inspect an unknown guest to find out
+what operating system it contains, what applications are
+installed, what filesystems, how the filesystems are used
+and much more. I cover that in the next section, but if
+you look below you'll see an example of running "virt-df".
+
+Finally there are now tools to resize guests, make them
+sparse, align them, and check their alignment. These
+last tools are ones that we eventually hope will become
+obsolete.
+
+[4 Inspection]
+
diff --git a/csharp/Makefile.in b/csharp/Makefile.in
index 9ef20ef..6d3639d 100644
--- a/csharp/Makefile.in
+++ b/csharp/Makefile.in
@@ -925,7 +925,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/daemon/Makefile.in b/daemon/Makefile.in
index 7e2f643..de194e2 100644
--- a/daemon/Makefile.in
+++ b/daemon/Makefile.in
@@ -1022,7 +1022,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/debian/changelog b/debian/changelog
index b0aa845..c25cfa1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,6 @@
-libguestfs (1.15.1-1) unstable; urgency=low
+libguestfs (1.15.2-1) unstable; urgency=low
- * release: New upstream version 1.15.1.
+ * release: New upstream version 1.15.2.
-- Richard W.M. Jones <rjones at redhat.com> Thu, 9 Dec 2010 12:00:00 +0000
diff --git a/debian/control b/debian/control
index 8027bda..02c4657 100644
--- a/debian/control
+++ b/debian/control
@@ -24,8 +24,6 @@ Build-Depends: debhelper (>= 7), dpkg-dev, devscripts, autotools-dev,
libsys-virt-perl, libwin-hivex-perl,
# FUSE
libfuse-dev, fuse-utils,
-# virt-resize
- libpcre-ocaml-dev,
# Debian OCaml
dh-ocaml,
# to create images in the test suite
diff --git a/df/Makefile.in b/df/Makefile.in
index 7558be5..b530d24 100644
--- a/df/Makefile.in
+++ b/df/Makefile.in
@@ -996,7 +996,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/edit/Makefile.in b/edit/Makefile.in
index 189f9c4..eb9af30 100644
--- a/edit/Makefile.in
+++ b/edit/Makefile.in
@@ -993,7 +993,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/erlang/Makefile.in b/erlang/Makefile.in
index dd1d54a..23ab678 100644
--- a/erlang/Makefile.in
+++ b/erlang/Makefile.in
@@ -989,7 +989,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/erlang/examples/Makefile.in b/erlang/examples/Makefile.in
index 00b5f58..7ec99d1 100644
--- a/erlang/examples/Makefile.in
+++ b/erlang/examples/Makefile.in
@@ -934,7 +934,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/examples/Makefile.in b/examples/Makefile.in
index 946527f..2e57ccd 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -990,7 +990,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/fish/Makefile.in b/fish/Makefile.in
index 1685d9e..a2391a3 100644
--- a/fish/Makefile.in
+++ b/fish/Makefile.in
@@ -1028,7 +1028,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/fuse/Makefile.in b/fuse/Makefile.in
index 61ef7f3..c15fac1 100644
--- a/fuse/Makefile.in
+++ b/fuse/Makefile.in
@@ -1002,7 +1002,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/generator/Makefile.in b/generator/Makefile.in
index ba0d12a..143c687 100644
--- a/generator/Makefile.in
+++ b/generator/Makefile.in
@@ -909,7 +909,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/generator/generator_bindtests.ml b/generator/generator_bindtests.ml
index 859f189..4d4795a 100644
--- a/generator/generator_bindtests.ml
+++ b/generator/generator_bindtests.ml
@@ -301,7 +301,7 @@ g = guestfs.GuestFS ()
fun f args -> pr "g.%s (%s)\n" f (mkargs args)
);
- pr "print \"EOF\"\n"
+ pr "print (\"EOF\")\n"
and generate_ruby_bindtests () =
generate_header HashStyle GPLv2plus;
diff --git a/generator/generator_python.ml b/generator/generator_python.ml
index c8448aa..6d22c18 100644
--- a/generator/generator_python.ml
+++ b/generator/generator_python.ml
@@ -35,6 +35,8 @@ let rec generate_python_c () =
generate_header CStyle LGPLv2plus;
pr "\
+#include <config.h>
+
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
@@ -47,6 +49,9 @@ get_string_list (PyObject *obj)
{
size_t i, len;
char **r;
+#ifndef HAVE_PYSTRING_ASSTRING
+ PyObject *bytes;
+#endif
assert (obj);
@@ -67,8 +72,14 @@ get_string_list (PyObject *obj)
return NULL;
}
- for (i = 0; i < len; ++i)
+ for (i = 0; i < len; ++i) {
+#ifdef HAVE_PYSTRING_ASSTRING
r[i] = PyString_AsString (PyList_GetItem (obj, i));
+#else
+ bytes = PyUnicode_AsUTF8String (PyList_GetItem (obj, i));
+ r[i] = PyBytes_AS_STRING (bytes);
+#endif
+ }
r[len] = NULL;
return r;
@@ -84,8 +95,13 @@ put_string_list (char * const * const argv)
;
list = PyList_New (argc);
- for (i = 0; i < argc; ++i)
+ for (i = 0; i < argc; ++i) {
+#ifdef HAVE_PYSTRING_ASSTRING
PyList_SetItem (list, i, PyString_FromString (argv[i]));
+#else
+ PyList_SetItem (list, i, PyUnicode_FromString (argv[i]));
+#endif
+ }
return list;
}
@@ -102,8 +118,13 @@ put_table (char * const * const argv)
list = PyList_New (argc >> 1);
for (i = 0; i < argc; i += 2) {
item = PyTuple_New (2);
+#ifdef HAVE_PYSTRING_ASSTRING
PyTuple_SetItem (item, 0, PyString_FromString (argv[i]));
PyTuple_SetItem (item, 1, PyString_FromString (argv[i+1]));
+#else
+ PyTuple_SetItem (item, 0, PyUnicode_FromString (argv[i]));
+ PyTuple_SetItem (item, 1, PyUnicode_FromString (argv[i+1]));
+#endif
PyList_SetItem (list, i >> 1, item);
}
@@ -150,16 +171,31 @@ free_strings (char **argv)
function
| name, FString ->
pr " PyDict_SetItemString (dict, \"%s\",\n" name;
+ pr "#ifdef HAVE_PYSTRING_ASSTRING\n";
pr " PyString_FromString (%s->%s));\n"
- typ name
+ typ name;
+ pr "#else\n";
+ pr " PyUnicode_FromString (%s->%s));\n"
+ typ name;
+ pr "#endif\n"
| name, FBuffer ->
pr " PyDict_SetItemString (dict, \"%s\",\n" name;
+ pr "#ifdef HAVE_PYSTRING_ASSTRING\n";
pr " PyString_FromStringAndSize (%s->%s, %s->%s_len));\n"
- typ name typ name
+ typ name typ name;
+ pr "#else\n";
+ pr " PyBytes_FromStringAndSize (%s->%s, %s->%s_len));\n"
+ typ name typ name;
+ pr "#endif\n"
| name, FUUID ->
pr " PyDict_SetItemString (dict, \"%s\",\n" name;
+ pr "#ifdef HAVE_PYSTRING_ASSTRING\n";
pr " PyString_FromStringAndSize (%s->%s, 32));\n"
- typ name
+ typ name;
+ pr "#else\n";
+ pr " PyBytes_FromStringAndSize (%s->%s, 32));\n"
+ typ name;
+ pr "#endif\n"
| name, (FBytes|FUInt64) ->
pr " PyDict_SetItemString (dict, \"%s\",\n" name;
pr " PyLong_FromUnsignedLongLong (%s->%s));\n"
@@ -186,8 +222,13 @@ free_strings (char **argv)
pr " PyDict_SetItemString (dict, \"%s\", Py_None);\n" name;
pr " }\n"
| name, FChar ->
+ pr "#ifdef HAVE_PYSTRING_ASSTRING\n";
pr " PyDict_SetItemString (dict, \"%s\",\n" name;
- pr " PyString_FromStringAndSize (&dirent->%s, 1));\n" name
+ pr " PyString_FromStringAndSize (&dirent->%s, 1));\n" name;
+ pr "#else\n";
+ pr " PyDict_SetItemString (dict, \"%s\",\n" name;
+ pr " PyUnicode_FromStringAndSize (&dirent->%s, 1));\n" name;
+ pr "#endif\n"
) cols;
pr " return dict;\n";
pr "};\n";
@@ -417,18 +458,31 @@ free_strings (char **argv)
pr " Py_INCREF (Py_None);\n";
pr " py_r = Py_None;\n"
| RInt _
- | RBool _ -> pr " py_r = PyInt_FromLong ((long) r);\n"
+ | RBool _ -> pr " py_r = PyLong_FromLong ((long) r);\n"
| RInt64 _ -> pr " py_r = PyLong_FromLongLong (r);\n"
- | RConstString _ -> pr " py_r = PyString_FromString (r);\n"
+ | RConstString _ ->
+ pr "#ifdef HAVE_PYSTRING_ASSTRING\n";
+ pr " py_r = PyString_FromString (r);\n";
+ pr "#else\n";
+ pr " py_r = PyUnicode_FromString (r);\n";
+ pr "#endif\n"
| RConstOptString _ ->
- pr " if (r)\n";
+ pr " if (r) {\n";
+ pr "#ifdef HAVE_PYSTRING_ASSTRING\n";
pr " py_r = PyString_FromString (r);\n";
- pr " else {\n";
+ pr "#else\n";
+ pr " py_r = PyUnicode_FromString (r);\n";
+ pr "#endif\n";
+ pr " } else {\n";
pr " Py_INCREF (Py_None);\n";
pr " py_r = Py_None;\n";
pr " }\n"
| RString _ ->
+ pr "#ifdef HAVE_PYSTRING_ASSTRING\n";
pr " py_r = PyString_FromString (r);\n";
+ pr "#else\n";
+ pr " py_r = PyUnicode_FromString (r);\n";
+ pr "#endif\n";
pr " free (r);\n"
| RStringList _ ->
pr " py_r = put_string_list (r);\n";
@@ -443,7 +497,11 @@ free_strings (char **argv)
pr " py_r = put_table (r);\n";
pr " free_strings (r);\n"
| RBufferOut _ ->
+ pr "#ifdef HAVE_PYSTRING_ASSTRING\n";
pr " py_r = PyString_FromStringAndSize (r, size);\n";
+ pr "#else\n";
+ pr " py_r = PyBytes_FromStringAndSize (r, size);\n";
+ pr "#endif\n";
pr " free (r);\n"
);
@@ -471,15 +529,47 @@ free_strings (char **argv)
(* Init function. *)
pr "\
+#if PY_MAJOR_VERSION >= 3
+static struct PyModuleDef moduledef = {
+ PyModuleDef_HEAD_INIT,
+ \"libguestfsmod\", /* m_name */
+ \"libguestfs module\", /* m_doc */
+ -1, /* m_size */
+ methods, /* m_methods */
+ NULL, /* m_reload */
+ NULL, /* m_traverse */
+ NULL, /* m_clear */
+ NULL, /* m_free */
+};
+#endif
+
+static PyObject *
+moduleinit (void)
+{
+ PyObject *m;
+
+#if PY_MAJOR_VERSION >= 3
+ m = PyModule_Create (&moduledef);
+#else
+ m = Py_InitModule ((char *) \"libguestfsmod\", methods);
+#endif
+
+ return m; /* m might be NULL if module init failed */
+}
+
+#if PY_MAJOR_VERSION >= 3
+PyMODINIT_FUNC
+PyInit_libguestfsmod (void)
+{
+ return moduleinit ();
+}
+#else
void
initlibguestfsmod (void)
{
- static int initialized = 0;
-
- if (initialized) return;
- Py_InitModule ((char *) \"libguestfsmod\", methods);
- initialized = 1;
+ (void) moduleinit ();
}
+#endif
"
(* Generate Python module. *)
@@ -487,7 +577,7 @@ and generate_python_py () =
generate_header HashStyle LGPLv2plus;
pr "\
-u\"\"\"Python bindings for libguestfs
+\"\"\"Python bindings for libguestfs
import guestfs
g = guestfs.GuestFS ()
@@ -564,7 +654,7 @@ class GuestFS:
raise ClosedHandle (\"GuestFS: method called on closed handle\")
def close (self):
- u\"\"\"Explicitly close the guestfs handle.
+ \"\"\"Explicitly close the guestfs handle.
The handle is closed implicitly when its reference count goes
to zero (eg. when it goes out of scope or the program ends).
@@ -579,7 +669,7 @@ class GuestFS:
self._o = None
def set_event_callback (self, cb, event_bitmask):
- u\"\"\"Register an event callback.
+ \"\"\"Register an event callback.
Register \"cb\" as a callback function for all of the
events in \"event_bitmask\". \"event_bitmask\" should be
@@ -604,7 +694,7 @@ class GuestFS:
return libguestfsmod.set_event_callback (self._o, cb, event_bitmask)
def delete_event_callback (self, event_handle):
- u\"\"\"Delete an event callback.\"\"\"
+ \"\"\"Delete an event callback.\"\"\"
self._check_not_closed ()
libguestfsmod.delete_event_callback (self._o, event_handle)
@@ -648,7 +738,7 @@ class GuestFS:
let doc = pod2text ~width:60 name doc in
let doc = List.map (fun line -> replace_str line "\\" "\\\\") doc in
let doc = String.concat "\n " doc in
- pr " u\"\"\"%s\"\"\"\n" doc;
+ pr " \"\"\"%s\"\"\"\n" doc;
);
(* Callers might pass in iterables instead of plain lists;
* convert those to plain lists because the C side of things
diff --git a/gnulib/lib/Makefile.in b/gnulib/lib/Makefile.in
index 7c003fd..2346b8a 100644
--- a/gnulib/lib/Makefile.in
+++ b/gnulib/lib/Makefile.in
@@ -989,7 +989,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/gnulib/tests/Makefile.in b/gnulib/tests/Makefile.in
index 148ed66..2922782 100644
--- a/gnulib/tests/Makefile.in
+++ b/gnulib/tests/Makefile.in
@@ -1963,7 +1963,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/haskell/Makefile.in b/haskell/Makefile.in
index 26916bc..f5971a6 100644
--- a/haskell/Makefile.in
+++ b/haskell/Makefile.in
@@ -927,7 +927,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/images/Makefile.in b/images/Makefile.in
index 19f3346..50fb779 100644
--- a/images/Makefile.in
+++ b/images/Makefile.in
@@ -927,7 +927,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/inspector/Makefile.in b/inspector/Makefile.in
index 8a2a71d..de14a3c 100644
--- a/inspector/Makefile.in
+++ b/inspector/Makefile.in
@@ -1004,7 +1004,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/inspector/virt-inspector.c b/inspector/virt-inspector.c
index 4afce0e..c505fa4 100644
--- a/inspector/virt-inspector.c
+++ b/inspector/virt-inspector.c
@@ -30,6 +30,10 @@
#include <libxml/xmlIO.h>
#include <libxml/xmlwriter.h>
+#include <libxml/xpath.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include <libxml/xmlsave.h>
#include "progname.h"
#include "c-ctype.h"
@@ -47,6 +51,7 @@ int keys_from_stdin = 0;
int echo_keys = 0;
const char *libvirt_uri = NULL;
int inspector = 1;
+static const char *xpath = NULL;
static void output (char **roots);
static void output_roots (xmlTextWriterPtr xo, char **roots);
@@ -58,6 +63,7 @@ static void output_applications (xmlTextWriterPtr xo, char *root);
static void canonicalize (char *dev);
static void free_strings (char **argv);
static int count_strings (char *const*argv);
+static void do_xpath (const char *query);
static inline char *
bad_cast (char const *s)
@@ -89,6 +95,7 @@ usage (int status)
" -v|--verbose Verbose messages\n"
" -V|--version Display version and exit\n"
" -x Trace libguestfs API calls\n"
+ " --xpath query Perform an XPath query\n"
"For more information, see the manpage %s(1).\n"),
program_name, program_name, program_name,
program_name);
@@ -119,6 +126,7 @@ main (int argc, char *argv[])
{ "keys-from-stdin", 0, 0, 0 },
{ "verbose", 0, 0, 'v' },
{ "version", 0, 0, 'V' },
+ { "xpath", 1, 0, 0 },
{ 0, 0, 0, 0 }
};
struct drv *drvs = NULL;
@@ -150,6 +158,8 @@ main (int argc, char *argv[])
format = NULL;
else
format = optarg;
+ } else if (STREQ (long_options[option_index].name, "xpath")) {
+ xpath = optarg;
} else {
fprintf (stderr, _("%s: unknown long option: %s (%d)\n"),
program_name, long_options[option_index].name, option_index);
@@ -237,6 +247,21 @@ main (int argc, char *argv[])
if (optind != argc)
usage (EXIT_FAILURE);
+ /* XPath is modal: no drives should be specified. There must be
+ * one extra parameter on the command line.
+ */
+ if (xpath) {
+ if (drvs != NULL) {
+ fprintf (stderr, _("%s: cannot use --xpath together with other options.\n"),
+ program_name);
+ exit (EXIT_FAILURE);
+ }
+
+ do_xpath (xpath);
+
+ exit (EXIT_SUCCESS);
+ }
+
/* User must have specified some drives. */
if (drvs == NULL)
usage (EXIT_FAILURE);
@@ -782,3 +807,102 @@ count_strings (char *const *argv)
;
return c;
}
+
+/* Run an XPath query on XML on stdin, print results to stdout. */
+static void
+do_xpath (const char *query)
+{
+ xmlDocPtr doc;
+ xmlXPathContextPtr xpathCtx;
+ xmlXPathObjectPtr xpathObj;
+ xmlNodeSetPtr nodes;
+ char *r;
+ size_t i;
+ xmlSaveCtxtPtr saveCtx;
+ xmlDocPtr wrdoc;
+ xmlNodePtr wrnode;
+
+ doc = xmlReadFd (STDIN_FILENO, NULL, "utf8", 0);
+ if (doc == NULL) {
+ fprintf (stderr, _("%s: unable to parse XML from stdin\n"), program_name);
+ exit (EXIT_FAILURE);
+ }
+
+ xpathCtx = xmlXPathNewContext (doc);
+ if (xpathCtx == NULL) {
+ fprintf (stderr, _("%s: unable to create new XPath context\n"),
+ program_name);
+ exit (EXIT_FAILURE);
+ }
+
+ xpathObj = xmlXPathEvalExpression (BAD_CAST query, xpathCtx);
+ if (xpathObj == NULL) {
+ fprintf (stderr, _("%s: unable to evaluate XPath expression\n"),
+ program_name);
+ exit (EXIT_FAILURE);
+ }
+
+ switch (xpathObj->type) {
+ case XPATH_NODESET:
+ nodes = xpathObj->nodesetval;
+
+ saveCtx = xmlSaveToFd (STDOUT_FILENO, NULL, XML_SAVE_NO_DECL);
+ if (saveCtx == NULL) {
+ fprintf (stderr, _("%s: xmlSaveToFd failed\n"), program_name);
+ exit (EXIT_FAILURE);
+ }
+
+ for (i = 0; i < (size_t) nodes->nodeNr; ++i) {
+ wrdoc = xmlNewDoc (BAD_CAST "1.0");
+ if (wrdoc == NULL) {
+ fprintf (stderr, _("%s: xmlNewDoc failed\n"), program_name);
+ exit (EXIT_FAILURE);
+ }
+ wrnode = xmlCopyNode (nodes->nodeTab[i], 1);
+ if (wrnode == NULL) {
+ fprintf (stderr, _("%s: xmlCopyNode failed\n"), program_name);
+ exit (EXIT_FAILURE);
+ }
+
+ xmlDocSetRootElement (wrdoc, wrnode);
+
+ if (xmlSaveDoc (saveCtx, wrdoc) == -1) {
+ fprintf (stderr, _("%s: xmlSaveDoc failed\n"), program_name);
+ exit (EXIT_FAILURE);
+ }
+
+ xmlFreeDoc (wrdoc);
+ }
+
+ xmlSaveClose (saveCtx);
+
+ break;
+
+ case XPATH_STRING:
+ r = (char *) xpathObj->stringval;
+ printf ("%s", r);
+ i = strlen (r);
+ if (i > 0 && r[i-1] != '\n')
+ printf ("\n");
+ break;
+
+ case XPATH_UNDEFINED: /* grrrrr ... switch-enum is a useless warning */
+ case XPATH_BOOLEAN:
+ case XPATH_NUMBER:
+ case XPATH_POINT:
+ case XPATH_RANGE:
+ case XPATH_LOCATIONSET:
+ case XPATH_USERS:
+ case XPATH_XSLT_TREE:
+ default:
+ r = (char *) xmlXPathCastToString (xpathObj);
+ printf ("%s\n", r);
+ free (r);
+ }
+
+ xmlXPathFreeObject (xpathObj);
+ xmlXPathFreeContext (xpathCtx);
+ xmlFreeDoc (doc);
+
+ exit (EXIT_SUCCESS);
+}
diff --git a/inspector/virt-inspector.pod b/inspector/virt-inspector.pod
index df9dfda..9a43e94 100755
--- a/inspector/virt-inspector.pod
+++ b/inspector/virt-inspector.pod
@@ -132,6 +132,13 @@ Display version number and exit.
Enable tracing of libguestfs API calls.
+=item B<--xpath> query
+
+Perform an XPath query on the XML on stdin, and print the result on
+stdout. In this mode virt-inspector simply runs an XPath query; all
+other inspection functions are disabled. See L</XPATH QUERIES> below
+for some examples.
+
=back
=head1 OLD-STYLE COMMAND LINE ARGUMENTS
@@ -327,26 +334,34 @@ installer, or one part of a multipart CD. For example:
<format>installer</format>
<live/>
-=head1 USING XPATH
+=head1 XPATH QUERIES
+
+Virt-inspector includes built in support for running XPath queries.
+The reason for including XPath support directly in virt-inspector is
+simply that there are no good and widely available command line
+programs that can do XPath queries. The only good one is
+L<xmlstarlet(1)> and that is not available on Red Hat Enterprise
+Linux.
-You can use the XPath query language to select parts of the XML. We
-recommend using C<xmlstarlet> to perform XPath queries from the
-command line.
+To perform an XPath query, use the I<--xpath> option. Note that in
+this mode, virt-inspector simply reads XML from stdin and outputs the
+query result on stdout. All other inspection features are disabled in
+this mode.
For example:
- $ virt-inspector -d Guest | xmlstarlet sel -t -c '//filesystems'
+ $ virt-inspector -d Guest | virt-inspector --xpath '//filesystems'
<filesystems>
<filesystem dev="/dev/vg_f13x64/lv_root">
<type>ext4</type>
[...]
$ virt-inspector -d Guest | \
- xmlstarlet sel -t -c "string(//filesystem[@dev='/dev/sda1']/type)"
+ virt-inspector --xpath "string(//filesystem[@dev='/dev/sda1']/type)"
ext4
$ virt-inspector -d Guest | \
- xmlstarlet sel -t -v '//icon' | base64 -i -d | display -
+ virt-inspector --xpath 'string(//icon)' | base64 -i -d | display -
[displays the guest icon, if there is one]
=head1 SHELL QUOTING
diff --git a/java/Makefile.in b/java/Makefile.in
index 673a5fe..1b71825 100644
--- a/java/Makefile.in
+++ b/java/Makefile.in
@@ -1014,7 +1014,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/java/examples/Makefile.in b/java/examples/Makefile.in
index ad81ebb..97e23ee 100644
--- a/java/examples/Makefile.in
+++ b/java/examples/Makefile.in
@@ -936,7 +936,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/libguestfs.pc b/libguestfs.pc
index 25c6c52..5a99268 100644
--- a/libguestfs.pc
+++ b/libguestfs.pc
@@ -4,7 +4,7 @@ libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: libguestfs
-Version: 1.15.1
+Version: 1.15.2
Description: libguestfs library for accessing and modifying VM images
Requires:
Cflags:
diff --git a/ocaml/Makefile.in b/ocaml/Makefile.in
index e21dfcb..88a9695 100644
--- a/ocaml/Makefile.in
+++ b/ocaml/Makefile.in
@@ -932,7 +932,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/ocaml/examples/Makefile.in b/ocaml/examples/Makefile.in
index f6aabcd..38fc3ea 100644
--- a/ocaml/examples/Makefile.in
+++ b/ocaml/examples/Makefile.in
@@ -936,7 +936,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/perl/Makefile.in b/perl/Makefile.in
index f8232d3..c04219a 100644
--- a/perl/Makefile.in
+++ b/perl/Makefile.in
@@ -927,7 +927,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/perl/examples/Makefile.in b/perl/examples/Makefile.in
index dcb7fea..7e2ed02 100644
--- a/perl/examples/Makefile.in
+++ b/perl/examples/Makefile.in
@@ -934,7 +934,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/php/Makefile.in b/php/Makefile.in
index 0cfdc5c..0b34939 100644
--- a/php/Makefile.in
+++ b/php/Makefile.in
@@ -951,7 +951,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/po-docs/Makefile.in b/po-docs/Makefile.in
index e4de634..72b25ab 100644
--- a/po-docs/Makefile.in
+++ b/po-docs/Makefile.in
@@ -951,7 +951,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/po-docs/ja.po b/po-docs/ja.po
index 6c9560a..cf21916 100644
--- a/po-docs/ja.po
+++ b/po-docs/ja.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libguestfs\n"
"Report-Msgid-Bugs-To: libguestfs at redhat.com\n"
-"POT-Creation-Date: 2011-11-01 14:20+0000\n"
+"POT-Creation-Date: 2011-11-03 14:10+0000\n"
"PO-Revision-Date: 2011-10-27 09:15+0000\n"
"Last-Translator: rjones <rjones at redhat.com>\n"
"Language-Team: Japanese <trans-ja at lists.fedoraproject.org>\n"
@@ -433,7 +433,7 @@ msgstr ""
#: ../cat/virt-filesystems.pod:179 ../cat/virt-ls.pod:337
#: ../clone/virt-sysprep.pod:104 ../df/virt-df.pod:110
#: ../edit/virt-edit.pod:141 ../fish/guestfish.pod:242
-#: ../fish/guestfish.pod:673 ../inspector/virt-inspector.pod:336
+#: ../fish/guestfish.pod:673 ../inspector/virt-inspector.pod:351
#: ../rescue/virt-rescue.pod:161 ../src/guestfs.pod:2877
msgid "For example:"
msgstr ""
@@ -860,7 +860,7 @@ msgstr ""
#: ../align/virt-alignment-scan.pod:311 ../cat/virt-cat.pod:231
#: ../cat/virt-filesystems.pod:373 ../cat/virt-ls.pod:483
#: ../clone/virt-sysprep.pod:475 ../df/virt-df.pod:215
-#: ../edit/virt-edit.pod:342 ../inspector/virt-inspector.pod:352
+#: ../edit/virt-edit.pod:342 ../inspector/virt-inspector.pod:367
#: ../rescue/virt-rescue.pod:303 ../resize/virt-resize.pod:676
#: ../tools/virt-list-filesystems.pl:188 ../tools/virt-list-partitions.pl:258
#: ../tools/virt-make-fs.pl:550 ../tools/virt-tar.pl:289
@@ -872,7 +872,7 @@ msgstr ""
#: ../align/virt-alignment-scan.pod:313 ../cat/virt-cat.pod:233
#: ../cat/virt-filesystems.pod:375 ../cat/virt-ls.pod:485
#: ../clone/virt-sysprep.pod:477 ../df/virt-df.pod:217
-#: ../edit/virt-edit.pod:344 ../inspector/virt-inspector.pod:354
+#: ../edit/virt-edit.pod:344 ../inspector/virt-inspector.pod:369
#: ../rescue/virt-rescue.pod:305 ../resize/virt-resize.pod:678
#: ../tools/virt-list-filesystems.pl:190 ../tools/virt-list-partitions.pl:260
#: ../tools/virt-make-fs.pl:552 ../tools/virt-tar.pl:291
@@ -889,7 +889,7 @@ msgstr ""
#: ../cat/virt-filesystems.pod:380 ../cat/virt-ls.pod:490
#: ../clone/virt-sysprep.pod:482 ../df/virt-df.pod:222
#: ../edit/virt-edit.pod:349 ../fish/guestfish.pod:1114
-#: ../fuse/guestmount.pod:312 ../inspector/virt-inspector.pod:375
+#: ../fuse/guestmount.pod:312 ../inspector/virt-inspector.pod:390
#: ../resize/virt-resize.pod:683 ../sparsify/virt-sparsify.pod:227
#: ../test-tool/libguestfs-test-tool.pod:90
msgid "EXIT STATUS"
@@ -936,8 +936,8 @@ msgstr ""
#: ../fish/guestfish-actions.pod:2150 ../fish/guestfish-actions.pod:2157
#: ../fish/guestfish-actions.pod:2164 ../fish/guestfish.pod:445
#: ../fish/guestfish.pod:449 ../fish/guestfish.pod:453
-#: ../fish/guestfish.pod:457 ../inspector/virt-inspector.pod:393
-#: ../inspector/virt-inspector.pod:397 ../resize/virt-resize.pod:359
+#: ../fish/guestfish.pod:457 ../inspector/virt-inspector.pod:408
+#: ../inspector/virt-inspector.pod:412 ../resize/virt-resize.pod:359
#: ../resize/virt-resize.pod:363 ../resize/virt-resize.pod:372
#: ../resize/virt-resize.pod:378 ../sparsify/virt-sparsify.pod:32
#: ../sparsify/virt-sparsify.pod:39 ../sparsify/virt-sparsify.pod:43
@@ -1035,7 +1035,7 @@ msgstr ""
#: ../fish/guestfish.pod:1268 ../fish/virt-copy-in.pod:50
#: ../fish/virt-copy-out.pod:39 ../fish/virt-tar-in.pod:47
#: ../fish/virt-tar-out.pod:41 ../fuse/guestmount.pod:317
-#: ../inspector/virt-inspector.pod:380 ../java/examples/guestfs-java.pod:45
+#: ../inspector/virt-inspector.pod:395 ../java/examples/guestfs-java.pod:45
#: ../ocaml/examples/guestfs-ocaml.pod:78 ../perl/examples/guestfs-perl.pod:39
#: ../python/examples/guestfs-python.pod:42 ../rescue/virt-rescue.pod:325
#: ../resize/virt-resize.pod:688 ../ruby/examples/guestfs-ruby.pod:36
@@ -1070,7 +1070,7 @@ msgstr ""
#: ../align/virt-alignment-scan.pod:363 ../cat/virt-cat.pod:254
#: ../cat/virt-filesystems.pod:398 ../cat/virt-ls.pod:509
#: ../clone/virt-sysprep.pod:503 ../df/virt-df.pod:237
-#: ../edit/virt-edit.pod:370 ../inspector/virt-inspector.pod:395
+#: ../edit/virt-edit.pod:370 ../inspector/virt-inspector.pod:410
#: ../rescue/virt-rescue.pod:336 ../resize/virt-resize.pod:713
#: ../sparsify/virt-sparsify.pod:266 ../tools/virt-list-filesystems.pl:210
#: ../tools/virt-list-partitions.pl:279 ../tools/virt-make-fs.pl:584
@@ -1087,7 +1087,7 @@ msgstr ""
#: ../fish/guestfish.pod:1300 ../fish/virt-copy-in.pod:64
#: ../fish/virt-copy-out.pod:53 ../fish/virt-tar-in.pod:62
#: ../fish/virt-tar-out.pod:55 ../fuse/guestmount.pod:332
-#: ../inspector/virt-inspector.pod:403 ../java/examples/guestfs-java.pod:62
+#: ../inspector/virt-inspector.pod:418 ../java/examples/guestfs-java.pod:62
#: ../ocaml/examples/guestfs-ocaml.pod:95 ../perl/examples/guestfs-perl.pod:56
#: ../python/examples/guestfs-python.pod:58 ../rescue/virt-rescue.pod:338
#: ../resize/virt-resize.pod:715 ../ruby/examples/guestfs-ruby.pod:52
@@ -1112,7 +1112,7 @@ msgstr ""
#: ../edit/virt-edit.pod:376 ../fish/guestfish.pod:1305
#: ../fish/virt-copy-in.pod:69 ../fish/virt-copy-out.pod:58
#: ../fish/virt-tar-in.pod:67 ../fish/virt-tar-out.pod:60
-#: ../fuse/guestmount.pod:337 ../inspector/virt-inspector.pod:407
+#: ../fuse/guestmount.pod:337 ../inspector/virt-inspector.pod:422
#: ../rescue/virt-rescue.pod:342 ../resize/virt-resize.pod:719
#: ../sparsify/virt-sparsify.pod:272 ../test-tool/libguestfs-test-tool.pod:115
#: ../tools/virt-list-filesystems.pl:216 ../tools/virt-list-partitions.pl:285
@@ -1132,7 +1132,7 @@ msgstr ""
#: ../edit/virt-edit.pod:381 ../fish/guestfish.pod:1310
#: ../fish/virt-copy-in.pod:74 ../fish/virt-copy-out.pod:63
#: ../fish/virt-tar-in.pod:72 ../fish/virt-tar-out.pod:65
-#: ../fuse/guestmount.pod:342 ../inspector/virt-inspector.pod:412
+#: ../fuse/guestmount.pod:342 ../inspector/virt-inspector.pod:427
#: ../rescue/virt-rescue.pod:347 ../resize/virt-resize.pod:724
#: ../sparsify/virt-sparsify.pod:277 ../test-tool/libguestfs-test-tool.pod:120
#: ../tools/virt-list-filesystems.pl:221 ../tools/virt-list-partitions.pl:290
@@ -1152,7 +1152,7 @@ msgstr ""
#: ../edit/virt-edit.pod:386 ../fish/guestfish.pod:1315
#: ../fish/virt-copy-in.pod:79 ../fish/virt-copy-out.pod:68
#: ../fish/virt-tar-in.pod:77 ../fish/virt-tar-out.pod:70
-#: ../fuse/guestmount.pod:347 ../inspector/virt-inspector.pod:417
+#: ../fuse/guestmount.pod:347 ../inspector/virt-inspector.pod:432
#: ../rescue/virt-rescue.pod:352 ../resize/virt-resize.pod:729
#: ../sparsify/virt-sparsify.pod:282 ../test-tool/libguestfs-test-tool.pod:125
#: ../tools/virt-list-filesystems.pl:226 ../tools/virt-list-partitions.pl:295
@@ -1383,7 +1383,7 @@ msgstr ""
#. type: =head1
#: ../cat/virt-cat.pod:152 ../cat/virt-ls.pod:443 ../edit/virt-edit.pod:179
-#: ../inspector/virt-inspector.pod:137 ../rescue/virt-rescue.pod:246
+#: ../inspector/virt-inspector.pod:144 ../rescue/virt-rescue.pod:246
msgid "OLD-STYLE COMMAND LINE ARGUMENTS"
msgstr ""
@@ -1402,7 +1402,7 @@ msgstr ""
#. type: textblock
#: ../cat/virt-cat.pod:158 ../cat/virt-ls.pod:449 ../edit/virt-edit.pod:185
-#: ../inspector/virt-inspector.pod:143 ../rescue/virt-rescue.pod:252
+#: ../inspector/virt-inspector.pod:150 ../rescue/virt-rescue.pod:252
msgid "or"
msgstr ""
@@ -1416,7 +1416,7 @@ msgstr ""
#. type: textblock
#: ../cat/virt-cat.pod:162 ../cat/virt-ls.pod:453 ../edit/virt-edit.pod:189
-#: ../inspector/virt-inspector.pod:147 ../rescue/virt-rescue.pod:256
+#: ../inspector/virt-inspector.pod:154 ../rescue/virt-rescue.pod:256
msgid ""
"whereas in this version you should use I<-a> or I<-d> respectively to avoid "
"the confusing case where a disk image might have the same name as a guest."
@@ -1424,7 +1424,7 @@ msgstr ""
#. type: textblock
#: ../cat/virt-cat.pod:166 ../cat/virt-ls.pod:457 ../edit/virt-edit.pod:193
-#: ../inspector/virt-inspector.pod:151 ../rescue/virt-rescue.pod:260
+#: ../inspector/virt-inspector.pod:158 ../rescue/virt-rescue.pod:260
msgid "For compatibility the old style is still supported."
msgstr ""
@@ -1540,7 +1540,7 @@ msgstr ""
#. type: textblock
#: ../cat/virt-cat.pod:240 ../cat/virt-filesystems.pod:382
#: ../cat/virt-ls.pod:492 ../df/virt-df.pod:224 ../edit/virt-edit.pod:351
-#: ../fuse/guestmount.pod:314 ../inspector/virt-inspector.pod:377
+#: ../fuse/guestmount.pod:314 ../inspector/virt-inspector.pod:392
#: ../resize/virt-resize.pod:685 ../sparsify/virt-sparsify.pod:229
msgid ""
"This program returns 0 if successful, or non-zero if there was an error."
@@ -1554,7 +1554,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../cat/virt-cat.pod:258 ../inspector/virt-inspector.pod:405
+#: ../cat/virt-cat.pod:258 ../inspector/virt-inspector.pod:420
#: ../resize/virt-resize.pod:717 ../tools/virt-make-fs.pl:588
msgid "Copyright (C) 2010-2011 Red Hat Inc."
msgstr ""
@@ -4780,7 +4780,7 @@ msgstr ""
#: ../fish/guestfish.pod:1296 ../fish/virt-copy-in.pod:60
#: ../fish/virt-copy-out.pod:49 ../fish/virt-tar-in.pod:58
#: ../fish/virt-tar-out.pod:51 ../fuse/guestmount.pod:328
-#: ../inspector/virt-inspector.pod:389 ../java/examples/guestfs-java.pod:58
+#: ../inspector/virt-inspector.pod:404 ../java/examples/guestfs-java.pod:58
#: ../ocaml/examples/guestfs-ocaml.pod:91 ../perl/examples/guestfs-perl.pod:52
#: ../python/examples/guestfs-python.pod:54
#: ../ruby/examples/guestfs-ruby.pod:48 ../src/guestfs.pod:3348
@@ -21632,7 +21632,7 @@ msgid ""
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:141
+#: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:148
#, no-wrap
msgid ""
" virt-inspector disk.img [disk.img ...]\n"
@@ -21747,13 +21747,26 @@ msgid ""
"the format is always specified."
msgstr ""
+#. type: =item
+#: ../inspector/virt-inspector.pod:135
+msgid "B<--xpath> query"
+msgstr ""
+
+#. type: textblock
+#: ../inspector/virt-inspector.pod:137
+msgid ""
+"Perform an XPath query on the XML on stdin, and print the result on stdout. "
+"In this mode virt-inspector simply runs an XPath query; all other inspection "
+"functions are disabled. See L</XPATH QUERIES> below for some examples."
+msgstr ""
+
#. type: textblock
-#: ../inspector/virt-inspector.pod:139
+#: ../inspector/virt-inspector.pod:146
msgid "Previous versions of virt-inspector allowed you to write either:"
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:145
+#: ../inspector/virt-inspector.pod:152
#, no-wrap
msgid ""
" virt-inspector guestname\n"
@@ -21761,12 +21774,12 @@ msgid ""
msgstr ""
#. type: =head1
-#: ../inspector/virt-inspector.pod:153
+#: ../inspector/virt-inspector.pod:160
msgid "XML FORMAT"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:155
+#: ../inspector/virt-inspector.pod:162
msgid ""
"The virt-inspector XML is described precisely in a RELAX NG schema file "
"C<virt-inspector.rng> which is supplied with libguestfs. This section is "
@@ -21774,7 +21787,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:159
+#: ../inspector/virt-inspector.pod:166
msgid ""
"The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
"more E<lt>operatingsystemE<gt> elements. You would only see more than one "
@@ -21783,12 +21796,12 @@ msgid ""
msgstr ""
#. type: =head2
-#: ../inspector/virt-inspector.pod:164
+#: ../inspector/virt-inspector.pod:171
msgid "E<lt>operatingsystemE<gt>"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:166
+#: ../inspector/virt-inspector.pod:173
msgid ""
"In the E<lt>operatingsystemE<gt> tag are various optional fields that "
"describe the operating system, its architecture, the descriptive \"product "
@@ -21796,7 +21809,7 @@ msgid ""
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:170
+#: ../inspector/virt-inspector.pod:177
#, no-wrap
msgid ""
" <operatingsystems>\n"
@@ -21815,7 +21828,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:183
+#: ../inspector/virt-inspector.pod:190
msgid ""
"In brief, E<lt>nameE<gt> is the class of operating system (something like "
"C<linux> or C<windows>), E<lt>distroE<gt> is the distribution (eg. C<fedora> "
@@ -21826,7 +21839,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:191
+#: ../inspector/virt-inspector.pod:198
msgid ""
"The E<lt>rootE<gt> element is the root filesystem device, but from the point "
"of view of libguestfs (block devices may have completely different names "
@@ -21834,12 +21847,12 @@ msgid ""
msgstr ""
#. type: =head2
-#: ../inspector/virt-inspector.pod:195
+#: ../inspector/virt-inspector.pod:202
msgid "E<lt>mountpointsE<gt>"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:197
+#: ../inspector/virt-inspector.pod:204
msgid ""
"Un*x-like guests typically have multiple filesystems which are mounted at "
"various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
@@ -21847,7 +21860,7 @@ msgid ""
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:201
+#: ../inspector/virt-inspector.pod:208
#, no-wrap
msgid ""
" <operatingsystems>\n"
@@ -21861,7 +21874,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:209
+#: ../inspector/virt-inspector.pod:216
msgid ""
"As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
"and may have completely different names inside the guest. Only mountable "
@@ -21869,12 +21882,12 @@ msgid ""
msgstr ""
#. type: =head2
-#: ../inspector/virt-inspector.pod:214
+#: ../inspector/virt-inspector.pod:221
msgid "E<lt>filesystemsE<gt>"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:216
+#: ../inspector/virt-inspector.pod:223
msgid ""
"E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
"filesystems belonging to the guest, including swap and empty partitions. "
@@ -21883,12 +21896,12 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:222
+#: ../inspector/virt-inspector.pod:229
msgid "You might see something like this:"
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:224
+#: ../inspector/virt-inspector.pod:231
#, no-wrap
msgid ""
" <operatingsystems>\n"
@@ -21904,19 +21917,19 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:234
+#: ../inspector/virt-inspector.pod:241
msgid ""
"The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
"the label, and the UUID."
msgstr ""
#. type: =head2
-#: ../inspector/virt-inspector.pod:237
+#: ../inspector/virt-inspector.pod:244
msgid "E<lt>applicationsE<gt>"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:239
+#: ../inspector/virt-inspector.pod:246
msgid ""
"The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
"and E<lt>applicationsE<gt> describe applications installed in the virtual "
@@ -21924,26 +21937,26 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:243
+#: ../inspector/virt-inspector.pod:250
msgid ""
"E<lt>package_formatE<gt>, if present, describes the packaging system used. "
"Typical values would be C<rpm> and C<deb>."
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:246
+#: ../inspector/virt-inspector.pod:253
msgid ""
"E<lt>package_managementE<gt>, if present, describes the package manager. "
"Typical values include C<yum>, C<up2date> and C<apt>"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:249
+#: ../inspector/virt-inspector.pod:256
msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:252
+#: ../inspector/virt-inspector.pod:259
#, no-wrap
msgid ""
" <operatingsystems>\n"
@@ -21959,7 +21972,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:262
+#: ../inspector/virt-inspector.pod:269
msgid ""
"The version and release fields may not be available for some types guests. "
"Other fields are possible, see L<guestfs(3)/"
@@ -21967,19 +21980,19 @@ msgid ""
msgstr ""
#. type: =head2
-#: ../inspector/virt-inspector.pod:266
+#: ../inspector/virt-inspector.pod:273
msgid "E<lt>drive_mappingsE<gt>"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:268
+#: ../inspector/virt-inspector.pod:275
msgid ""
"For operating systems like Windows which use drive letters, virt-inspector "
"is able to find out how drive letters map to filesystems."
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:272
+#: ../inspector/virt-inspector.pod:279
#, no-wrap
msgid ""
" <operatingsystems>\n"
@@ -21993,7 +22006,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:280
+#: ../inspector/virt-inspector.pod:287
msgid ""
"In the example above, drive C maps to the filesystem on the second partition "
"on the first disk, and drive E maps to the filesystem on the first partition "
@@ -22001,7 +22014,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:284
+#: ../inspector/virt-inspector.pod:291
msgid ""
"Note that this only covers permanent local filesystem mappings, not things "
"like network shares. Furthermore NTFS volume mount points may not be listed "
@@ -22009,12 +22022,12 @@ msgid ""
msgstr ""
#. type: =head2
-#: ../inspector/virt-inspector.pod:288
+#: ../inspector/virt-inspector.pod:295
msgid "E<lt>iconE<gt>"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:290
+#: ../inspector/virt-inspector.pod:297
msgid ""
"Virt-inspector is sometimes able to extract an icon or logo for the guest. "
"The icon is returned as base64-encoded PNG data. Note that the icon can be "
@@ -22022,7 +22035,7 @@ msgid ""
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:294
+#: ../inspector/virt-inspector.pod:301
#, no-wrap
msgid ""
" <operatingsystems>\n"
@@ -22036,7 +22049,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:302
+#: ../inspector/virt-inspector.pod:309
msgid ""
"To display the icon, you have to extract it and convert the base64 data back "
"to a binary file. Use an XPath query or simply an editor to extract the "
@@ -22045,7 +22058,7 @@ msgid ""
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:307
+#: ../inspector/virt-inspector.pod:314
#, no-wrap
msgid ""
" base64 -i -d < icon.data > icon.png\n"
@@ -22053,19 +22066,19 @@ msgid ""
msgstr ""
#. type: =head2
-#: ../inspector/virt-inspector.pod:309
+#: ../inspector/virt-inspector.pod:316
msgid "INSPECTING INSTALL DISKS, LIVE CDs"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:311
+#: ../inspector/virt-inspector.pod:318
msgid ""
"Virt-inspector can detect some operating system installers on install disks, "
"live CDs, bootable USB keys and more."
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:314
+#: ../inspector/virt-inspector.pod:321
msgid ""
"In this case the E<lt>formatE<gt> tag will contain C<installer> and other "
"fields may be present to indicate a live CD, network installer, or one part "
@@ -22073,7 +22086,7 @@ msgid ""
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:318
+#: ../inspector/virt-inspector.pod:325
#, no-wrap
msgid ""
" <operatingsystems>\n"
@@ -22091,22 +22104,33 @@ msgid ""
msgstr ""
#. type: =head1
-#: ../inspector/virt-inspector.pod:330
-msgid "USING XPATH"
+#: ../inspector/virt-inspector.pod:337
+msgid "XPATH QUERIES"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:332
+#: ../inspector/virt-inspector.pod:339
msgid ""
-"You can use the XPath query language to select parts of the XML. We "
-"recommend using C<xmlstarlet> to perform XPath queries from the command line."
+"Virt-inspector includes built in support for running XPath queries. The "
+"reason for including XPath support directly in virt-inspector is simply that "
+"there are no good and widely available command line programs that can do "
+"XPath queries. The only good one is L<xmlstarlet(1)> and that is not "
+"available on Red Hat Enterprise Linux."
+msgstr ""
+
+#. type: textblock
+#: ../inspector/virt-inspector.pod:346
+msgid ""
+"To perform an XPath query, use the I<--xpath> option. Note that in this "
+"mode, virt-inspector simply reads XML from stdin and outputs the query "
+"result on stdout. All other inspection features are disabled in this mode."
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:338
+#: ../inspector/virt-inspector.pod:353
#, no-wrap
msgid ""
-" $ virt-inspector -d Guest | xmlstarlet sel -t -c '//filesystems'\n"
+" $ virt-inspector -d Guest | virt-inspector --xpath '//filesystems'\n"
" <filesystems>\n"
" <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
" <type>ext4</type>\n"
@@ -22115,32 +22139,32 @@ msgid ""
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:344
+#: ../inspector/virt-inspector.pod:359
#, no-wrap
msgid ""
" $ virt-inspector -d Guest | \\\n"
-" xmlstarlet sel -t -c \"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
+" virt-inspector --xpath \"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
" ext4\n"
"\n"
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:348
+#: ../inspector/virt-inspector.pod:363
#, no-wrap
msgid ""
" $ virt-inspector -d Guest | \\\n"
-" xmlstarlet sel -t -v '//icon' | base64 -i -d | display -\n"
+" virt-inspector --xpath 'string(//icon)' | base64 -i -d | display -\n"
" [displays the guest icon, if there is one]\n"
"\n"
msgstr ""
#. type: =head1
-#: ../inspector/virt-inspector.pod:359
+#: ../inspector/virt-inspector.pod:374
msgid "OLD VERSIONS OF VIRT-INSPECTOR"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:361
+#: ../inspector/virt-inspector.pod:376
msgid ""
"Early versions of libguestfs shipped with a different virt-inspector program "
"written in Perl (the current version is written in C). The XML output of "
@@ -22149,20 +22173,20 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:366
+#: ../inspector/virt-inspector.pod:381
msgid ""
"The old virt-inspector is no longer supported or shipped with libguestfs."
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:369
+#: ../inspector/virt-inspector.pod:384
msgid ""
"To confuse matters further, in Red Hat Enterprise Linux 6 we ship two "
"versions of virt-inspector with different names:"
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:372
+#: ../inspector/virt-inspector.pod:387
#, no-wrap
msgid ""
" virt-inspector Old Perl version.\n"
@@ -22171,14 +22195,14 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:382
+#: ../inspector/virt-inspector.pod:397
msgid ""
"L<guestfs(3)>, L<guestfish(1)>, L<http://www.w3.org/TR/xpath/>, L<base64(1)"
">, L<xmlstarlet(1)>, L<http://libguestfs.org/>."
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:399
+#: ../inspector/virt-inspector.pod:414
msgid "Matthew Booth L<mbooth at redhat.com>"
msgstr ""
diff --git a/po-docs/ja/Makefile.in b/po-docs/ja/Makefile.in
index 0cc8f11..7e41a5d 100644
--- a/po-docs/ja/Makefile.in
+++ b/po-docs/ja/Makefile.in
@@ -911,7 +911,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/po-docs/ja/guestfish.1 b/po-docs/ja/guestfish.1
index 11ccf98..dc33c71 100644
--- a/po-docs/ja/guestfish.1
+++ b/po-docs/ja/guestfish.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "guestfish 1"
-.TH guestfish 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH guestfish 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/guestfs.3 b/po-docs/ja/guestfs.3
index 0cfd369..5236773 100644
--- a/po-docs/ja/guestfs.3
+++ b/po-docs/ja/guestfs.3
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "guestfs 3"
-.TH guestfs 3 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH guestfs 3 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/guestmount.1 b/po-docs/ja/guestmount.1
index 04e0e0e..b47efc6 100644
--- a/po-docs/ja/guestmount.1
+++ b/po-docs/ja/guestmount.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "guestmount 1"
-.TH guestmount 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH guestmount 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/libguestfs-test-tool.1 b/po-docs/ja/libguestfs-test-tool.1
index f580bfd..e42e6c9 100644
--- a/po-docs/ja/libguestfs-test-tool.1
+++ b/po-docs/ja/libguestfs-test-tool.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "libguestfs-test-tool 1"
-.TH libguestfs-test-tool 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH libguestfs-test-tool 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/virt-alignment-scan.1 b/po-docs/ja/virt-alignment-scan.1
index 352fac1..12e3c87 100644
--- a/po-docs/ja/virt-alignment-scan.1
+++ b/po-docs/ja/virt-alignment-scan.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-alignment-scan 1"
-.TH virt-alignment-scan 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-alignment-scan 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/virt-cat.1 b/po-docs/ja/virt-cat.1
index d77d320..b96131d 100644
--- a/po-docs/ja/virt-cat.1
+++ b/po-docs/ja/virt-cat.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-cat 1"
-.TH virt-cat 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-cat 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/virt-copy-in.1 b/po-docs/ja/virt-copy-in.1
index 4bf44e4..e681568 100644
--- a/po-docs/ja/virt-copy-in.1
+++ b/po-docs/ja/virt-copy-in.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-copy-in 1"
-.TH virt-copy-in 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-copy-in 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/virt-copy-out.1 b/po-docs/ja/virt-copy-out.1
index 9d3e062..6d635cb 100644
--- a/po-docs/ja/virt-copy-out.1
+++ b/po-docs/ja/virt-copy-out.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-copy-out 1"
-.TH virt-copy-out 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-copy-out 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/virt-df.1 b/po-docs/ja/virt-df.1
index be24757..693afc5 100644
--- a/po-docs/ja/virt-df.1
+++ b/po-docs/ja/virt-df.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-df 1"
-.TH virt-df 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-df 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/virt-edit.1 b/po-docs/ja/virt-edit.1
index 5a659c4..3ee2c37 100644
--- a/po-docs/ja/virt-edit.1
+++ b/po-docs/ja/virt-edit.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-edit 1"
-.TH virt-edit 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-edit 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/virt-filesystems.1 b/po-docs/ja/virt-filesystems.1
index 8522fee..d7306fa 100644
--- a/po-docs/ja/virt-filesystems.1
+++ b/po-docs/ja/virt-filesystems.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-filesystems 1"
-.TH virt-filesystems 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-filesystems 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/virt-inspector.1 b/po-docs/ja/virt-inspector.1
index 5ad177b..b45b8fd 100644
--- a/po-docs/ja/virt-inspector.1
+++ b/po-docs/ja/virt-inspector.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-inspector 1"
-.TH virt-inspector 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-inspector 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -197,6 +197,11 @@ Display version number and exit.
.IP "\fB\-x\fR" 4
.IX Item "-x"
Enable tracing of libguestfs \s-1API\s0 calls.
+.IP "\fB\-\-xpath\fR query" 4
+.IX Item "--xpath query"
+Perform an XPath query on the \s-1XML\s0 on stdin, and print the result on stdout.
+In this mode virt-inspector simply runs an XPath query; all other inspection
+functions are disabled. See \*(L"\s-1XPATH\s0 \s-1QUERIES\s0\*(R" below for some examples.
.SH "OLD-STYLE COMMAND LINE ARGUMENTS"
.IX Header "OLD-STYLE COMMAND LINE ARGUMENTS"
Previous versions of virt-inspector allowed you to write either:
@@ -395,27 +400,33 @@ of a multipart \s-1CD\s0. For example:
\& <format>installer</format>
\& <live/>
.Ve
-.SH "USING XPATH"
-.IX Header "USING XPATH"
-You can use the XPath query language to select parts of the \s-1XML\s0. We
-recommend using \f(CW\*(C`xmlstarlet\*(C'\fR to perform XPath queries from the command
-line.
+.SH "XPATH QUERIES"
+.IX Header "XPATH QUERIES"
+Virt-inspector includes built in support for running XPath queries. The
+reason for including XPath support directly in virt-inspector is simply that
+there are no good and widely available command line programs that can do
+XPath queries. The only good one is \fIxmlstarlet\fR\|(1) and that is not
+available on Red Hat Enterprise Linux.
+.PP
+To perform an XPath query, use the \fI\-\-xpath\fR option. Note that in this
+mode, virt-inspector simply reads \s-1XML\s0 from stdin and outputs the query
+result on stdout. All other inspection features are disabled in this mode.
.PP
For example:
.PP
.Vb 5
-\& $ virt\-inspector \-d Guest | xmlstarlet sel \-t \-c \*(Aq//filesystems\*(Aq
+\& $ virt\-inspector \-d Guest | virt\-inspector \-\-xpath \*(Aq//filesystems\*(Aq
\& <filesystems>
\& <filesystem dev="/dev/vg_f13x64/lv_root">
\& <type>ext4</type>
\& [...]
\&
\& $ virt\-inspector \-d Guest | \e
-\& xmlstarlet sel \-t \-c "string(//filesystem[@dev=\*(Aq/dev/sda1\*(Aq]/type)"
+\& virt\-inspector \-\-xpath "string(//filesystem[@dev=\*(Aq/dev/sda1\*(Aq]/type)"
\& ext4
\&
\& $ virt\-inspector \-d Guest | \e
-\& xmlstarlet sel \-t \-v \*(Aq//icon\*(Aq | base64 \-i \-d | display \-
+\& virt\-inspector \-\-xpath \*(Aqstring(//icon)\*(Aq | base64 \-i \-d | display \-
\& [displays the guest icon, if there is one]
.Ve
.SH "SHELL QUOTING"
diff --git a/po-docs/ja/virt-inspector.pod b/po-docs/ja/virt-inspector.pod
index bcf0d7e..c01a453 100644
--- a/po-docs/ja/virt-inspector.pod
+++ b/po-docs/ja/virt-inspector.pod
@@ -129,6 +129,12 @@ Display version number and exit.
Enable tracing of libguestfs API calls.
+=item B<--xpath> query
+
+Perform an XPath query on the XML on stdin, and print the result on stdout.
+In this mode virt-inspector simply runs an XPath query; all other inspection
+functions are disabled. See L</XPATH QUERIES> below for some examples.
+
=back
=head1 OLD-STYLE COMMAND LINE ARGUMENTS
@@ -318,26 +324,32 @@ of a multipart CD. For example:
<format>installer</format>
<live/>
-=head1 USING XPATH
+=head1 XPATH QUERIES
+
+Virt-inspector includes built in support for running XPath queries. The
+reason for including XPath support directly in virt-inspector is simply that
+there are no good and widely available command line programs that can do
+XPath queries. The only good one is L<xmlstarlet(1)> and that is not
+available on Red Hat Enterprise Linux.
-You can use the XPath query language to select parts of the XML. We
-recommend using C<xmlstarlet> to perform XPath queries from the command
-line.
+To perform an XPath query, use the I<--xpath> option. Note that in this
+mode, virt-inspector simply reads XML from stdin and outputs the query
+result on stdout. All other inspection features are disabled in this mode.
For example:
- $ virt-inspector -d Guest | xmlstarlet sel -t -c '//filesystems'
+ $ virt-inspector -d Guest | virt-inspector --xpath '//filesystems'
<filesystems>
<filesystem dev="/dev/vg_f13x64/lv_root">
<type>ext4</type>
[...]
$ virt-inspector -d Guest | \
- xmlstarlet sel -t -c "string(//filesystem[@dev='/dev/sda1']/type)"
+ virt-inspector --xpath "string(//filesystem[@dev='/dev/sda1']/type)"
ext4
$ virt-inspector -d Guest | \
- xmlstarlet sel -t -v '//icon' | base64 -i -d | display -
+ virt-inspector --xpath 'string(//icon)' | base64 -i -d | display -
[displays the guest icon, if there is one]
=head1 SHELL QUOTING
diff --git a/po-docs/ja/virt-list-filesystems.1 b/po-docs/ja/virt-list-filesystems.1
index 1400545..456cbe8 100644
--- a/po-docs/ja/virt-list-filesystems.1
+++ b/po-docs/ja/virt-list-filesystems.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-list-filesystems.pl 1"
-.TH virt-list-filesystems.pl 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-list-filesystems.pl 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/virt-list-partitions.1 b/po-docs/ja/virt-list-partitions.1
index f6ff9d9..420e8b7 100644
--- a/po-docs/ja/virt-list-partitions.1
+++ b/po-docs/ja/virt-list-partitions.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-list-partitions.pl 1"
-.TH virt-list-partitions.pl 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-list-partitions.pl 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/virt-ls.1 b/po-docs/ja/virt-ls.1
index 6c5eb00..eaca4d6 100644
--- a/po-docs/ja/virt-ls.1
+++ b/po-docs/ja/virt-ls.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-ls 1"
-.TH virt-ls 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-ls 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/virt-make-fs.1 b/po-docs/ja/virt-make-fs.1
index 35b96d2..25ab823 100644
--- a/po-docs/ja/virt-make-fs.1
+++ b/po-docs/ja/virt-make-fs.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-make-fs.pl 1"
-.TH virt-make-fs.pl 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-make-fs.pl 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/virt-rescue.1 b/po-docs/ja/virt-rescue.1
index a093fa2..cef206a 100644
--- a/po-docs/ja/virt-rescue.1
+++ b/po-docs/ja/virt-rescue.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-rescue 1"
-.TH virt-rescue 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-rescue 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/virt-resize.1 b/po-docs/ja/virt-resize.1
index 7303688..eefb543 100644
--- a/po-docs/ja/virt-resize.1
+++ b/po-docs/ja/virt-resize.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-resize 1"
-.TH virt-resize 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-resize 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/virt-sparsify.1 b/po-docs/ja/virt-sparsify.1
index 8d2591e..f90e9b4 100644
--- a/po-docs/ja/virt-sparsify.1
+++ b/po-docs/ja/virt-sparsify.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-sparsify 1"
-.TH virt-sparsify 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-sparsify 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/virt-sysprep.1 b/po-docs/ja/virt-sysprep.1
index 30c5551..61b944d 100644
--- a/po-docs/ja/virt-sysprep.1
+++ b/po-docs/ja/virt-sysprep.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-sysprep 1"
-.TH virt-sysprep 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-sysprep 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/virt-tar-in.1 b/po-docs/ja/virt-tar-in.1
index 797fb9d..d0f01f9 100644
--- a/po-docs/ja/virt-tar-in.1
+++ b/po-docs/ja/virt-tar-in.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-tar-in 1"
-.TH virt-tar-in 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-tar-in 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/virt-tar-out.1 b/po-docs/ja/virt-tar-out.1
index afd134c..9524095 100644
--- a/po-docs/ja/virt-tar-out.1
+++ b/po-docs/ja/virt-tar-out.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-tar-out 1"
-.TH virt-tar-out 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-tar-out 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/virt-tar.1 b/po-docs/ja/virt-tar.1
index ae5f92c..0ce404c 100644
--- a/po-docs/ja/virt-tar.1
+++ b/po-docs/ja/virt-tar.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-tar.pl 1"
-.TH virt-tar.pl 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-tar.pl 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/ja/virt-win-reg.1 b/po-docs/ja/virt-win-reg.1
index 25b9844..b41fb9c 100644
--- a/po-docs/ja/virt-win-reg.1
+++ b/po-docs/ja/virt-win-reg.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-win-reg.pl 1"
-.TH virt-win-reg.pl 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-win-reg.pl 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/libguestfs-docs.pot b/po-docs/libguestfs-docs.pot
index 7f99c0e..180fc70 100644
--- a/po-docs/libguestfs-docs.pot
+++ b/po-docs/libguestfs-docs.pot
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: libguestfs 1.15.1\n"
+"Project-Id-Version: libguestfs 1.15.2\n"
"Report-Msgid-Bugs-To: libguestfs at redhat.com\n"
-"POT-Creation-Date: 2011-11-01 14:20+0000\n"
+"POT-Creation-Date: 2011-11-03 14:10+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
@@ -309,7 +309,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../align/virt-alignment-scan.pod:132 ../cat/virt-cat.pod:114 ../cat/virt-filesystems.pod:179 ../cat/virt-ls.pod:337 ../clone/virt-sysprep.pod:104 ../df/virt-df.pod:110 ../edit/virt-edit.pod:141 ../fish/guestfish.pod:242 ../fish/guestfish.pod:673 ../inspector/virt-inspector.pod:336 ../rescue/virt-rescue.pod:161 ../src/guestfs.pod:2877
+#: ../align/virt-alignment-scan.pod:132 ../cat/virt-cat.pod:114 ../cat/virt-filesystems.pod:179 ../cat/virt-ls.pod:337 ../clone/virt-sysprep.pod:104 ../df/virt-df.pod:110 ../edit/virt-edit.pod:141 ../fish/guestfish.pod:242 ../fish/guestfish.pod:673 ../inspector/virt-inspector.pod:351 ../rescue/virt-rescue.pod:161 ../src/guestfs.pod:2877
msgid "For example:"
msgstr ""
@@ -673,12 +673,12 @@ msgid ""
msgstr ""
#. type: =head1
-#: ../align/virt-alignment-scan.pod:311 ../cat/virt-cat.pod:231 ../cat/virt-filesystems.pod:373 ../cat/virt-ls.pod:483 ../clone/virt-sysprep.pod:475 ../df/virt-df.pod:215 ../edit/virt-edit.pod:342 ../inspector/virt-inspector.pod:352 ../rescue/virt-rescue.pod:303 ../resize/virt-resize.pod:676 ../tools/virt-list-filesystems.pl:188 ../tools/virt-list-partitions.pl:258 ../tools/virt-make-fs.pl:550 ../tools/virt-tar.pl:289 ../tools/virt-win-reg.pl:744
+#: ../align/virt-alignment-scan.pod:311 ../cat/virt-cat.pod:231 ../cat/virt-filesystems.pod:373 ../cat/virt-ls.pod:483 ../clone/virt-sysprep.pod:475 ../df/virt-df.pod:215 ../edit/virt-edit.pod:342 ../inspector/virt-inspector.pod:367 ../rescue/virt-rescue.pod:303 ../resize/virt-resize.pod:676 ../tools/virt-list-filesystems.pl:188 ../tools/virt-list-partitions.pl:258 ../tools/virt-make-fs.pl:550 ../tools/virt-tar.pl:289 ../tools/virt-win-reg.pl:744
msgid "SHELL QUOTING"
msgstr ""
#. type: textblock
-#: ../align/virt-alignment-scan.pod:313 ../cat/virt-cat.pod:233 ../cat/virt-filesystems.pod:375 ../cat/virt-ls.pod:485 ../clone/virt-sysprep.pod:477 ../df/virt-df.pod:217 ../edit/virt-edit.pod:344 ../inspector/virt-inspector.pod:354 ../rescue/virt-rescue.pod:305 ../resize/virt-resize.pod:678 ../tools/virt-list-filesystems.pl:190 ../tools/virt-list-partitions.pl:260 ../tools/virt-make-fs.pl:552 ../tools/virt-tar.pl:291 ../tools/virt-win-reg.pl:752
+#: ../align/virt-alignment-scan.pod:313 ../cat/virt-cat.pod:233 ../cat/virt-filesystems.pod:375 ../cat/virt-ls.pod:485 ../clone/virt-sysprep.pod:477 ../df/virt-df.pod:217 ../edit/virt-edit.pod:344 ../inspector/virt-inspector.pod:369 ../rescue/virt-rescue.pod:305 ../resize/virt-resize.pod:678 ../tools/virt-list-filesystems.pl:190 ../tools/virt-list-partitions.pl:260 ../tools/virt-make-fs.pl:552 ../tools/virt-tar.pl:291 ../tools/virt-win-reg.pl:752
msgid ""
"Libvirt guest names can contain arbitrary characters, some of which have "
"meaning to the shell such as C<#> and space. You may need to quote or "
@@ -687,7 +687,7 @@ msgid ""
msgstr ""
#. type: =head1
-#: ../align/virt-alignment-scan.pod:318 ../cat/virt-cat.pod:238 ../cat/virt-filesystems.pod:380 ../cat/virt-ls.pod:490 ../clone/virt-sysprep.pod:482 ../df/virt-df.pod:222 ../edit/virt-edit.pod:349 ../fish/guestfish.pod:1114 ../fuse/guestmount.pod:312 ../inspector/virt-inspector.pod:375 ../resize/virt-resize.pod:683 ../sparsify/virt-sparsify.pod:227 ../test-tool/libguestfs-test-tool.pod:90
+#: ../align/virt-alignment-scan.pod:318 ../cat/virt-cat.pod:238 ../cat/virt-filesystems.pod:380 ../cat/virt-ls.pod:490 ../clone/virt-sysprep.pod:482 ../df/virt-df.pod:222 ../edit/virt-edit.pod:349 ../fish/guestfish.pod:1114 ../fuse/guestmount.pod:312 ../inspector/virt-inspector.pod:390 ../resize/virt-resize.pod:683 ../sparsify/virt-sparsify.pod:227 ../test-tool/libguestfs-test-tool.pod:90
msgid "EXIT STATUS"
msgstr ""
@@ -697,7 +697,7 @@ msgid "This program returns:"
msgstr ""
#. type: =item
-#: ../align/virt-alignment-scan.pod:324 ../align/virt-alignment-scan.pod:330 ../align/virt-alignment-scan.pod:336 ../align/virt-alignment-scan.pod:343 ../cat/virt-cat.pod:177 ../cat/virt-cat.pod:182 ../cat/virt-cat.pod:187 ../cat/virt-cat.pod:198 ../cat/virt-cat.pod:202 ../clone/virt-sysprep.pod:283 ../clone/virt-sysprep.pod:287 ../clone/virt-sysprep.pod:291 ../clone/virt-sysprep.pod:295 ../clone/virt-sysprep.pod:310 ../clone/virt-sysprep.pod:314 ../clone/virt-sysprep.pod:318 ../clone/vi [...]
+#: ../align/virt-alignment-scan.pod:324 ../align/virt-alignment-scan.pod:330 ../align/virt-alignment-scan.pod:336 ../align/virt-alignment-scan.pod:343 ../cat/virt-cat.pod:177 ../cat/virt-cat.pod:182 ../cat/virt-cat.pod:187 ../cat/virt-cat.pod:198 ../cat/virt-cat.pod:202 ../clone/virt-sysprep.pod:283 ../clone/virt-sysprep.pod:287 ../clone/virt-sysprep.pod:291 ../clone/virt-sysprep.pod:295 ../clone/virt-sysprep.pod:310 ../clone/virt-sysprep.pod:314 ../clone/virt-sysprep.pod:318 ../clone/vi [...]
msgid "*"
msgstr ""
@@ -746,7 +746,7 @@ msgid ""
msgstr ""
#. type: =head1
-#: ../align/virt-alignment-scan.pod:352 ../cat/virt-cat.pod:243 ../cat/virt-filesystems.pod:385 ../cat/virt-ls.pod:495 ../clone/virt-sysprep.pod:486 ../df/virt-df.pod:227 ../edit/virt-edit.pod:354 ../erlang/examples/guestfs-erlang.pod:97 ../examples/guestfs-examples.pod:33 ../examples/guestfs-recipes.pod:384 ../fish/guestfish.pod:1268 ../fish/virt-copy-in.pod:50 ../fish/virt-copy-out.pod:39 ../fish/virt-tar-in.pod:47 ../fish/virt-tar-out.pod:41 ../fuse/guestmount.pod:317 ../inspector/vir [...]
+#: ../align/virt-alignment-scan.pod:352 ../cat/virt-cat.pod:243 ../cat/virt-filesystems.pod:385 ../cat/virt-ls.pod:495 ../clone/virt-sysprep.pod:486 ../df/virt-df.pod:227 ../edit/virt-edit.pod:354 ../erlang/examples/guestfs-erlang.pod:97 ../examples/guestfs-examples.pod:33 ../examples/guestfs-recipes.pod:384 ../fish/guestfish.pod:1268 ../fish/virt-copy-in.pod:50 ../fish/virt-copy-out.pod:39 ../fish/virt-tar-in.pod:47 ../fish/virt-tar-out.pod:41 ../fuse/guestmount.pod:317 ../inspector/vir [...]
msgid "SEE ALSO"
msgstr ""
@@ -763,12 +763,12 @@ msgid "AUTHOR"
msgstr ""
#. type: textblock
-#: ../align/virt-alignment-scan.pod:363 ../cat/virt-cat.pod:254 ../cat/virt-filesystems.pod:398 ../cat/virt-ls.pod:509 ../clone/virt-sysprep.pod:503 ../df/virt-df.pod:237 ../edit/virt-edit.pod:370 ../inspector/virt-inspector.pod:395 ../rescue/virt-rescue.pod:336 ../resize/virt-resize.pod:713 ../sparsify/virt-sparsify.pod:266 ../tools/virt-list-filesystems.pl:210 ../tools/virt-list-partitions.pl:279 ../tools/virt-make-fs.pl:584 ../tools/virt-tar.pl:313 ../tools/virt-win-reg.pl:785
+#: ../align/virt-alignment-scan.pod:363 ../cat/virt-cat.pod:254 ../cat/virt-filesystems.pod:398 ../cat/virt-ls.pod:509 ../clone/virt-sysprep.pod:503 ../df/virt-df.pod:237 ../edit/virt-edit.pod:370 ../inspector/virt-inspector.pod:410 ../rescue/virt-rescue.pod:336 ../resize/virt-resize.pod:713 ../sparsify/virt-sparsify.pod:266 ../tools/virt-list-filesystems.pl:210 ../tools/virt-list-partitions.pl:279 ../tools/virt-make-fs.pl:584 ../tools/virt-tar.pl:313 ../tools/virt-win-reg.pl:785
msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
msgstr ""
#. type: =head1
-#: ../align/virt-alignment-scan.pod:365 ../cat/virt-cat.pod:256 ../cat/virt-filesystems.pod:400 ../cat/virt-ls.pod:511 ../clone/virt-sysprep.pod:505 ../df/virt-df.pod:239 ../edit/virt-edit.pod:372 ../erlang/examples/guestfs-erlang.pod:114 ../examples/guestfs-examples.pod:49 ../examples/guestfs-recipes.pod:401 ../fish/guestfish.pod:1300 ../fish/virt-copy-in.pod:64 ../fish/virt-copy-out.pod:53 ../fish/virt-tar-in.pod:62 ../fish/virt-tar-out.pod:55 ../fuse/guestmount.pod:332 ../inspector/vi [...]
+#: ../align/virt-alignment-scan.pod:365 ../cat/virt-cat.pod:256 ../cat/virt-filesystems.pod:400 ../cat/virt-ls.pod:511 ../clone/virt-sysprep.pod:505 ../df/virt-df.pod:239 ../edit/virt-edit.pod:372 ../erlang/examples/guestfs-erlang.pod:114 ../examples/guestfs-examples.pod:49 ../examples/guestfs-recipes.pod:401 ../fish/guestfish.pod:1300 ../fish/virt-copy-in.pod:64 ../fish/virt-copy-out.pod:53 ../fish/virt-tar-in.pod:62 ../fish/virt-tar-out.pod:55 ../fuse/guestmount.pod:332 ../inspector/vi [...]
msgid "COPYRIGHT"
msgstr ""
@@ -778,7 +778,7 @@ msgid "Copyright (C) 2011 Red Hat Inc."
msgstr ""
#. type: textblock
-#: ../align/virt-alignment-scan.pod:369 ../cat/virt-cat.pod:260 ../cat/virt-filesystems.pod:404 ../cat/virt-ls.pod:515 ../clone/virt-sysprep.pod:509 ../df/virt-df.pod:243 ../edit/virt-edit.pod:376 ../fish/guestfish.pod:1305 ../fish/virt-copy-in.pod:69 ../fish/virt-copy-out.pod:58 ../fish/virt-tar-in.pod:67 ../fish/virt-tar-out.pod:60 ../fuse/guestmount.pod:337 ../inspector/virt-inspector.pod:407 ../rescue/virt-rescue.pod:342 ../resize/virt-resize.pod:719 ../sparsify/virt-sparsify.pod:272 [...]
+#: ../align/virt-alignment-scan.pod:369 ../cat/virt-cat.pod:260 ../cat/virt-filesystems.pod:404 ../cat/virt-ls.pod:515 ../clone/virt-sysprep.pod:509 ../df/virt-df.pod:243 ../edit/virt-edit.pod:376 ../fish/guestfish.pod:1305 ../fish/virt-copy-in.pod:69 ../fish/virt-copy-out.pod:58 ../fish/virt-tar-in.pod:67 ../fish/virt-tar-out.pod:60 ../fuse/guestmount.pod:337 ../inspector/virt-inspector.pod:422 ../rescue/virt-rescue.pod:342 ../resize/virt-resize.pod:719 ../sparsify/virt-sparsify.pod:272 [...]
msgid ""
"This program is free software; you can redistribute it and/or modify it "
"under the terms of the GNU General Public License as published by the Free "
@@ -787,7 +787,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../align/virt-alignment-scan.pod:374 ../cat/virt-cat.pod:265 ../cat/virt-filesystems.pod:409 ../cat/virt-ls.pod:520 ../clone/virt-sysprep.pod:514 ../df/virt-df.pod:248 ../edit/virt-edit.pod:381 ../fish/guestfish.pod:1310 ../fish/virt-copy-in.pod:74 ../fish/virt-copy-out.pod:63 ../fish/virt-tar-in.pod:72 ../fish/virt-tar-out.pod:65 ../fuse/guestmount.pod:342 ../inspector/virt-inspector.pod:412 ../rescue/virt-rescue.pod:347 ../resize/virt-resize.pod:724 ../sparsify/virt-sparsify.pod:277 [...]
+#: ../align/virt-alignment-scan.pod:374 ../cat/virt-cat.pod:265 ../cat/virt-filesystems.pod:409 ../cat/virt-ls.pod:520 ../clone/virt-sysprep.pod:514 ../df/virt-df.pod:248 ../edit/virt-edit.pod:381 ../fish/guestfish.pod:1310 ../fish/virt-copy-in.pod:74 ../fish/virt-copy-out.pod:63 ../fish/virt-tar-in.pod:72 ../fish/virt-tar-out.pod:65 ../fuse/guestmount.pod:342 ../inspector/virt-inspector.pod:427 ../rescue/virt-rescue.pod:347 ../resize/virt-resize.pod:724 ../sparsify/virt-sparsify.pod:277 [...]
msgid ""
"This program is distributed in the hope that it will be useful, but WITHOUT "
"ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
@@ -796,7 +796,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../align/virt-alignment-scan.pod:379 ../cat/virt-cat.pod:270 ../cat/virt-filesystems.pod:414 ../cat/virt-ls.pod:525 ../clone/virt-sysprep.pod:519 ../df/virt-df.pod:253 ../edit/virt-edit.pod:386 ../fish/guestfish.pod:1315 ../fish/virt-copy-in.pod:79 ../fish/virt-copy-out.pod:68 ../fish/virt-tar-in.pod:77 ../fish/virt-tar-out.pod:70 ../fuse/guestmount.pod:347 ../inspector/virt-inspector.pod:417 ../rescue/virt-rescue.pod:352 ../resize/virt-resize.pod:729 ../sparsify/virt-sparsify.pod:282 [...]
+#: ../align/virt-alignment-scan.pod:379 ../cat/virt-cat.pod:270 ../cat/virt-filesystems.pod:414 ../cat/virt-ls.pod:525 ../clone/virt-sysprep.pod:519 ../df/virt-df.pod:253 ../edit/virt-edit.pod:386 ../fish/guestfish.pod:1315 ../fish/virt-copy-in.pod:79 ../fish/virt-copy-out.pod:68 ../fish/virt-tar-in.pod:77 ../fish/virt-tar-out.pod:70 ../fuse/guestmount.pod:347 ../inspector/virt-inspector.pod:432 ../rescue/virt-rescue.pod:352 ../resize/virt-resize.pod:729 ../sparsify/virt-sparsify.pod:282 [...]
msgid ""
"You should have received a copy of the GNU General Public License along with "
"this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
@@ -1005,7 +1005,7 @@ msgid ""
msgstr ""
#. type: =head1
-#: ../cat/virt-cat.pod:152 ../cat/virt-ls.pod:443 ../edit/virt-edit.pod:179 ../inspector/virt-inspector.pod:137 ../rescue/virt-rescue.pod:246
+#: ../cat/virt-cat.pod:152 ../cat/virt-ls.pod:443 ../edit/virt-edit.pod:179 ../inspector/virt-inspector.pod:144 ../rescue/virt-rescue.pod:246
msgid "OLD-STYLE COMMAND LINE ARGUMENTS"
msgstr ""
@@ -1023,7 +1023,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../cat/virt-cat.pod:158 ../cat/virt-ls.pod:449 ../edit/virt-edit.pod:185 ../inspector/virt-inspector.pod:143 ../rescue/virt-rescue.pod:252
+#: ../cat/virt-cat.pod:158 ../cat/virt-ls.pod:449 ../edit/virt-edit.pod:185 ../inspector/virt-inspector.pod:150 ../rescue/virt-rescue.pod:252
msgid "or"
msgstr ""
@@ -1036,14 +1036,14 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../cat/virt-cat.pod:162 ../cat/virt-ls.pod:453 ../edit/virt-edit.pod:189 ../inspector/virt-inspector.pod:147 ../rescue/virt-rescue.pod:256
+#: ../cat/virt-cat.pod:162 ../cat/virt-ls.pod:453 ../edit/virt-edit.pod:189 ../inspector/virt-inspector.pod:154 ../rescue/virt-rescue.pod:256
msgid ""
"whereas in this version you should use I<-a> or I<-d> respectively to avoid "
"the confusing case where a disk image might have the same name as a guest."
msgstr ""
#. type: textblock
-#: ../cat/virt-cat.pod:166 ../cat/virt-ls.pod:457 ../edit/virt-edit.pod:193 ../inspector/virt-inspector.pod:151 ../rescue/virt-rescue.pod:260
+#: ../cat/virt-cat.pod:166 ../cat/virt-ls.pod:457 ../edit/virt-edit.pod:193 ../inspector/virt-inspector.pod:158 ../rescue/virt-rescue.pod:260
msgid "For compatibility the old style is still supported."
msgstr ""
@@ -1157,7 +1157,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../cat/virt-cat.pod:240 ../cat/virt-filesystems.pod:382 ../cat/virt-ls.pod:492 ../df/virt-df.pod:224 ../edit/virt-edit.pod:351 ../fuse/guestmount.pod:314 ../inspector/virt-inspector.pod:377 ../resize/virt-resize.pod:685 ../sparsify/virt-sparsify.pod:229
+#: ../cat/virt-cat.pod:240 ../cat/virt-filesystems.pod:382 ../cat/virt-ls.pod:492 ../df/virt-df.pod:224 ../edit/virt-edit.pod:351 ../fuse/guestmount.pod:314 ../inspector/virt-inspector.pod:392 ../resize/virt-resize.pod:685 ../sparsify/virt-sparsify.pod:229
msgid "This program returns 0 if successful, or non-zero if there was an error."
msgstr ""
@@ -1169,7 +1169,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../cat/virt-cat.pod:258 ../inspector/virt-inspector.pod:405 ../resize/virt-resize.pod:717 ../tools/virt-make-fs.pl:588
+#: ../cat/virt-cat.pod:258 ../inspector/virt-inspector.pod:420 ../resize/virt-resize.pod:717 ../tools/virt-make-fs.pl:588
msgid "Copyright (C) 2010-2011 Red Hat Inc."
msgstr ""
@@ -4343,7 +4343,7 @@ msgid ""
msgstr ""
#. type: =head1
-#: ../erlang/examples/guestfs-erlang.pod:110 ../examples/guestfs-examples.pod:45 ../examples/guestfs-recipes.pod:397 ../fish/guestfish.pod:1296 ../fish/virt-copy-in.pod:60 ../fish/virt-copy-out.pod:49 ../fish/virt-tar-in.pod:58 ../fish/virt-tar-out.pod:51 ../fuse/guestmount.pod:328 ../inspector/virt-inspector.pod:389 ../java/examples/guestfs-java.pod:58 ../ocaml/examples/guestfs-ocaml.pod:91 ../perl/examples/guestfs-perl.pod:52 ../python/examples/guestfs-python.pod:54 ../ruby/examples/gu [...]
+#: ../erlang/examples/guestfs-erlang.pod:110 ../examples/guestfs-examples.pod:45 ../examples/guestfs-recipes.pod:397 ../fish/guestfish.pod:1296 ../fish/virt-copy-in.pod:60 ../fish/virt-copy-out.pod:49 ../fish/virt-tar-in.pod:58 ../fish/virt-tar-out.pod:51 ../fuse/guestmount.pod:328 ../inspector/virt-inspector.pod:404 ../java/examples/guestfs-java.pod:58 ../ocaml/examples/guestfs-ocaml.pod:91 ../perl/examples/guestfs-perl.pod:52 ../python/examples/guestfs-python.pod:54 ../ruby/examples/gu [...]
msgid "AUTHORS"
msgstr ""
@@ -20929,7 +20929,7 @@ msgid ""
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:141
+#: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:148
#, no-wrap
msgid ""
" virt-inspector disk.img [disk.img ...]\n"
@@ -21037,13 +21037,26 @@ msgid ""
"the format is always specified."
msgstr ""
+#. type: =item
+#: ../inspector/virt-inspector.pod:135
+msgid "B<--xpath> query"
+msgstr ""
+
+#. type: textblock
+#: ../inspector/virt-inspector.pod:137
+msgid ""
+"Perform an XPath query on the XML on stdin, and print the result on stdout. "
+"In this mode virt-inspector simply runs an XPath query; all other inspection "
+"functions are disabled. See L</XPATH QUERIES> below for some examples."
+msgstr ""
+
#. type: textblock
-#: ../inspector/virt-inspector.pod:139
+#: ../inspector/virt-inspector.pod:146
msgid "Previous versions of virt-inspector allowed you to write either:"
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:145
+#: ../inspector/virt-inspector.pod:152
#, no-wrap
msgid ""
" virt-inspector guestname\n"
@@ -21051,12 +21064,12 @@ msgid ""
msgstr ""
#. type: =head1
-#: ../inspector/virt-inspector.pod:153
+#: ../inspector/virt-inspector.pod:160
msgid "XML FORMAT"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:155
+#: ../inspector/virt-inspector.pod:162
msgid ""
"The virt-inspector XML is described precisely in a RELAX NG schema file "
"C<virt-inspector.rng> which is supplied with libguestfs. This section is "
@@ -21064,7 +21077,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:159
+#: ../inspector/virt-inspector.pod:166
msgid ""
"The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
"more E<lt>operatingsystemE<gt> elements. You would only see more than one "
@@ -21073,12 +21086,12 @@ msgid ""
msgstr ""
#. type: =head2
-#: ../inspector/virt-inspector.pod:164
+#: ../inspector/virt-inspector.pod:171
msgid "E<lt>operatingsystemE<gt>"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:166
+#: ../inspector/virt-inspector.pod:173
msgid ""
"In the E<lt>operatingsystemE<gt> tag are various optional fields that "
"describe the operating system, its architecture, the descriptive \"product "
@@ -21086,7 +21099,7 @@ msgid ""
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:170
+#: ../inspector/virt-inspector.pod:177
#, no-wrap
msgid ""
" <operatingsystems>\n"
@@ -21105,7 +21118,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:183
+#: ../inspector/virt-inspector.pod:190
msgid ""
"In brief, E<lt>nameE<gt> is the class of operating system (something like "
"C<linux> or C<windows>), E<lt>distroE<gt> is the distribution (eg. C<fedora> "
@@ -21116,7 +21129,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:191
+#: ../inspector/virt-inspector.pod:198
msgid ""
"The E<lt>rootE<gt> element is the root filesystem device, but from the point "
"of view of libguestfs (block devices may have completely different names "
@@ -21124,12 +21137,12 @@ msgid ""
msgstr ""
#. type: =head2
-#: ../inspector/virt-inspector.pod:195
+#: ../inspector/virt-inspector.pod:202
msgid "E<lt>mountpointsE<gt>"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:197
+#: ../inspector/virt-inspector.pod:204
msgid ""
"Un*x-like guests typically have multiple filesystems which are mounted at "
"various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
@@ -21137,7 +21150,7 @@ msgid ""
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:201
+#: ../inspector/virt-inspector.pod:208
#, no-wrap
msgid ""
" <operatingsystems>\n"
@@ -21151,7 +21164,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:209
+#: ../inspector/virt-inspector.pod:216
msgid ""
"As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
"and may have completely different names inside the guest. Only mountable "
@@ -21159,12 +21172,12 @@ msgid ""
msgstr ""
#. type: =head2
-#: ../inspector/virt-inspector.pod:214
+#: ../inspector/virt-inspector.pod:221
msgid "E<lt>filesystemsE<gt>"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:216
+#: ../inspector/virt-inspector.pod:223
msgid ""
"E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
"filesystems belonging to the guest, including swap and empty partitions. "
@@ -21173,12 +21186,12 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:222
+#: ../inspector/virt-inspector.pod:229
msgid "You might see something like this:"
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:224
+#: ../inspector/virt-inspector.pod:231
#, no-wrap
msgid ""
" <operatingsystems>\n"
@@ -21194,19 +21207,19 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:234
+#: ../inspector/virt-inspector.pod:241
msgid ""
"The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
"the label, and the UUID."
msgstr ""
#. type: =head2
-#: ../inspector/virt-inspector.pod:237
+#: ../inspector/virt-inspector.pod:244
msgid "E<lt>applicationsE<gt>"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:239
+#: ../inspector/virt-inspector.pod:246
msgid ""
"The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
"and E<lt>applicationsE<gt> describe applications installed in the virtual "
@@ -21214,26 +21227,26 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:243
+#: ../inspector/virt-inspector.pod:250
msgid ""
"E<lt>package_formatE<gt>, if present, describes the packaging system used. "
"Typical values would be C<rpm> and C<deb>."
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:246
+#: ../inspector/virt-inspector.pod:253
msgid ""
"E<lt>package_managementE<gt>, if present, describes the package manager. "
"Typical values include C<yum>, C<up2date> and C<apt>"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:249
+#: ../inspector/virt-inspector.pod:256
msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:252
+#: ../inspector/virt-inspector.pod:259
#, no-wrap
msgid ""
" <operatingsystems>\n"
@@ -21249,7 +21262,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:262
+#: ../inspector/virt-inspector.pod:269
msgid ""
"The version and release fields may not be available for some types guests. "
"Other fields are possible, see "
@@ -21257,19 +21270,19 @@ msgid ""
msgstr ""
#. type: =head2
-#: ../inspector/virt-inspector.pod:266
+#: ../inspector/virt-inspector.pod:273
msgid "E<lt>drive_mappingsE<gt>"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:268
+#: ../inspector/virt-inspector.pod:275
msgid ""
"For operating systems like Windows which use drive letters, virt-inspector "
"is able to find out how drive letters map to filesystems."
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:272
+#: ../inspector/virt-inspector.pod:279
#, no-wrap
msgid ""
" <operatingsystems>\n"
@@ -21283,7 +21296,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:280
+#: ../inspector/virt-inspector.pod:287
msgid ""
"In the example above, drive C maps to the filesystem on the second partition "
"on the first disk, and drive E maps to the filesystem on the first partition "
@@ -21291,7 +21304,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:284
+#: ../inspector/virt-inspector.pod:291
msgid ""
"Note that this only covers permanent local filesystem mappings, not things "
"like network shares. Furthermore NTFS volume mount points may not be listed "
@@ -21299,12 +21312,12 @@ msgid ""
msgstr ""
#. type: =head2
-#: ../inspector/virt-inspector.pod:288
+#: ../inspector/virt-inspector.pod:295
msgid "E<lt>iconE<gt>"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:290
+#: ../inspector/virt-inspector.pod:297
msgid ""
"Virt-inspector is sometimes able to extract an icon or logo for the guest. "
"The icon is returned as base64-encoded PNG data. Note that the icon can be "
@@ -21312,7 +21325,7 @@ msgid ""
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:294
+#: ../inspector/virt-inspector.pod:301
#, no-wrap
msgid ""
" <operatingsystems>\n"
@@ -21326,7 +21339,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:302
+#: ../inspector/virt-inspector.pod:309
msgid ""
"To display the icon, you have to extract it and convert the base64 data back "
"to a binary file. Use an XPath query or simply an editor to extract the "
@@ -21335,7 +21348,7 @@ msgid ""
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:307
+#: ../inspector/virt-inspector.pod:314
#, no-wrap
msgid ""
" base64 -i -d < icon.data > icon.png\n"
@@ -21343,19 +21356,19 @@ msgid ""
msgstr ""
#. type: =head2
-#: ../inspector/virt-inspector.pod:309
+#: ../inspector/virt-inspector.pod:316
msgid "INSPECTING INSTALL DISKS, LIVE CDs"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:311
+#: ../inspector/virt-inspector.pod:318
msgid ""
"Virt-inspector can detect some operating system installers on install disks, "
"live CDs, bootable USB keys and more."
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:314
+#: ../inspector/virt-inspector.pod:321
msgid ""
"In this case the E<lt>formatE<gt> tag will contain C<installer> and other "
"fields may be present to indicate a live CD, network installer, or one part "
@@ -21363,7 +21376,7 @@ msgid ""
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:318
+#: ../inspector/virt-inspector.pod:325
#, no-wrap
msgid ""
" <operatingsystems>\n"
@@ -21382,23 +21395,33 @@ msgid ""
msgstr ""
#. type: =head1
-#: ../inspector/virt-inspector.pod:330
-msgid "USING XPATH"
+#: ../inspector/virt-inspector.pod:337
+msgid "XPATH QUERIES"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:332
+#: ../inspector/virt-inspector.pod:339
msgid ""
-"You can use the XPath query language to select parts of the XML. We "
-"recommend using C<xmlstarlet> to perform XPath queries from the command "
-"line."
+"Virt-inspector includes built in support for running XPath queries. The "
+"reason for including XPath support directly in virt-inspector is simply that "
+"there are no good and widely available command line programs that can do "
+"XPath queries. The only good one is L<xmlstarlet(1)> and that is not "
+"available on Red Hat Enterprise Linux."
+msgstr ""
+
+#. type: textblock
+#: ../inspector/virt-inspector.pod:346
+msgid ""
+"To perform an XPath query, use the I<--xpath> option. Note that in this "
+"mode, virt-inspector simply reads XML from stdin and outputs the query "
+"result on stdout. All other inspection features are disabled in this mode."
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:338
+#: ../inspector/virt-inspector.pod:353
#, no-wrap
msgid ""
-" $ virt-inspector -d Guest | xmlstarlet sel -t -c '//filesystems'\n"
+" $ virt-inspector -d Guest | virt-inspector --xpath '//filesystems'\n"
" <filesystems>\n"
" <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
" <type>ext4</type>\n"
@@ -21407,32 +21430,33 @@ msgid ""
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:344
+#: ../inspector/virt-inspector.pod:359
#, no-wrap
msgid ""
" $ virt-inspector -d Guest | \\\n"
-" xmlstarlet sel -t -c \"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
+" virt-inspector --xpath "
+"\"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
" ext4\n"
"\n"
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:348
+#: ../inspector/virt-inspector.pod:363
#, no-wrap
msgid ""
" $ virt-inspector -d Guest | \\\n"
-" xmlstarlet sel -t -v '//icon' | base64 -i -d | display -\n"
+" virt-inspector --xpath 'string(//icon)' | base64 -i -d | display -\n"
" [displays the guest icon, if there is one]\n"
"\n"
msgstr ""
#. type: =head1
-#: ../inspector/virt-inspector.pod:359
+#: ../inspector/virt-inspector.pod:374
msgid "OLD VERSIONS OF VIRT-INSPECTOR"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:361
+#: ../inspector/virt-inspector.pod:376
msgid ""
"Early versions of libguestfs shipped with a different virt-inspector program "
"written in Perl (the current version is written in C). The XML output of "
@@ -21441,19 +21465,19 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:366
+#: ../inspector/virt-inspector.pod:381
msgid "The old virt-inspector is no longer supported or shipped with libguestfs."
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:369
+#: ../inspector/virt-inspector.pod:384
msgid ""
"To confuse matters further, in Red Hat Enterprise Linux 6 we ship two "
"versions of virt-inspector with different names:"
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:372
+#: ../inspector/virt-inspector.pod:387
#, no-wrap
msgid ""
" virt-inspector Old Perl version.\n"
@@ -21462,14 +21486,14 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:382
+#: ../inspector/virt-inspector.pod:397
msgid ""
"L<guestfs(3)>, L<guestfish(1)>, L<http://www.w3.org/TR/xpath/>, "
"L<base64(1)>, L<xmlstarlet(1)>, L<http://libguestfs.org/>."
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:399
+#: ../inspector/virt-inspector.pod:414
msgid "Matthew Booth L<mbooth at redhat.com>"
msgstr ""
diff --git a/po-docs/uk.po b/po-docs/uk.po
index 279bcc7..dfb612c 100644
--- a/po-docs/uk.po
+++ b/po-docs/uk.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libguestfs\n"
"Report-Msgid-Bugs-To: libguestfs at redhat.com\n"
-"POT-Creation-Date: 2011-11-01 14:20+0000\n"
+"POT-Creation-Date: 2011-11-03 14:10+0000\n"
"PO-Revision-Date: 2011-10-27 09:15+0000\n"
"Last-Translator: rjones <rjones at redhat.com>\n"
"Language-Team: Ukrainian <trans-uk at lists.fedoraproject.org>\n"
@@ -433,7 +433,7 @@ msgstr ""
#: ../cat/virt-filesystems.pod:179 ../cat/virt-ls.pod:337
#: ../clone/virt-sysprep.pod:104 ../df/virt-df.pod:110
#: ../edit/virt-edit.pod:141 ../fish/guestfish.pod:242
-#: ../fish/guestfish.pod:673 ../inspector/virt-inspector.pod:336
+#: ../fish/guestfish.pod:673 ../inspector/virt-inspector.pod:351
#: ../rescue/virt-rescue.pod:161 ../src/guestfs.pod:2877
msgid "For example:"
msgstr "Приклад:"
@@ -860,7 +860,7 @@ msgstr ""
#: ../align/virt-alignment-scan.pod:311 ../cat/virt-cat.pod:231
#: ../cat/virt-filesystems.pod:373 ../cat/virt-ls.pod:483
#: ../clone/virt-sysprep.pod:475 ../df/virt-df.pod:215
-#: ../edit/virt-edit.pod:342 ../inspector/virt-inspector.pod:352
+#: ../edit/virt-edit.pod:342 ../inspector/virt-inspector.pod:367
#: ../rescue/virt-rescue.pod:303 ../resize/virt-resize.pod:676
#: ../tools/virt-list-filesystems.pl:188 ../tools/virt-list-partitions.pl:258
#: ../tools/virt-make-fs.pl:550 ../tools/virt-tar.pl:289
@@ -872,7 +872,7 @@ msgstr ""
#: ../align/virt-alignment-scan.pod:313 ../cat/virt-cat.pod:233
#: ../cat/virt-filesystems.pod:375 ../cat/virt-ls.pod:485
#: ../clone/virt-sysprep.pod:477 ../df/virt-df.pod:217
-#: ../edit/virt-edit.pod:344 ../inspector/virt-inspector.pod:354
+#: ../edit/virt-edit.pod:344 ../inspector/virt-inspector.pod:369
#: ../rescue/virt-rescue.pod:305 ../resize/virt-resize.pod:678
#: ../tools/virt-list-filesystems.pl:190 ../tools/virt-list-partitions.pl:260
#: ../tools/virt-make-fs.pl:552 ../tools/virt-tar.pl:291
@@ -889,7 +889,7 @@ msgstr ""
#: ../cat/virt-filesystems.pod:380 ../cat/virt-ls.pod:490
#: ../clone/virt-sysprep.pod:482 ../df/virt-df.pod:222
#: ../edit/virt-edit.pod:349 ../fish/guestfish.pod:1114
-#: ../fuse/guestmount.pod:312 ../inspector/virt-inspector.pod:375
+#: ../fuse/guestmount.pod:312 ../inspector/virt-inspector.pod:390
#: ../resize/virt-resize.pod:683 ../sparsify/virt-sparsify.pod:227
#: ../test-tool/libguestfs-test-tool.pod:90
msgid "EXIT STATUS"
@@ -936,8 +936,8 @@ msgstr ""
#: ../fish/guestfish-actions.pod:2150 ../fish/guestfish-actions.pod:2157
#: ../fish/guestfish-actions.pod:2164 ../fish/guestfish.pod:445
#: ../fish/guestfish.pod:449 ../fish/guestfish.pod:453
-#: ../fish/guestfish.pod:457 ../inspector/virt-inspector.pod:393
-#: ../inspector/virt-inspector.pod:397 ../resize/virt-resize.pod:359
+#: ../fish/guestfish.pod:457 ../inspector/virt-inspector.pod:408
+#: ../inspector/virt-inspector.pod:412 ../resize/virt-resize.pod:359
#: ../resize/virt-resize.pod:363 ../resize/virt-resize.pod:372
#: ../resize/virt-resize.pod:378 ../sparsify/virt-sparsify.pod:32
#: ../sparsify/virt-sparsify.pod:39 ../sparsify/virt-sparsify.pod:43
@@ -1035,7 +1035,7 @@ msgstr ""
#: ../fish/guestfish.pod:1268 ../fish/virt-copy-in.pod:50
#: ../fish/virt-copy-out.pod:39 ../fish/virt-tar-in.pod:47
#: ../fish/virt-tar-out.pod:41 ../fuse/guestmount.pod:317
-#: ../inspector/virt-inspector.pod:380 ../java/examples/guestfs-java.pod:45
+#: ../inspector/virt-inspector.pod:395 ../java/examples/guestfs-java.pod:45
#: ../ocaml/examples/guestfs-ocaml.pod:78 ../perl/examples/guestfs-perl.pod:39
#: ../python/examples/guestfs-python.pod:42 ../rescue/virt-rescue.pod:325
#: ../resize/virt-resize.pod:688 ../ruby/examples/guestfs-ruby.pod:36
@@ -1070,7 +1070,7 @@ msgstr "АВТОР"
#: ../align/virt-alignment-scan.pod:363 ../cat/virt-cat.pod:254
#: ../cat/virt-filesystems.pod:398 ../cat/virt-ls.pod:509
#: ../clone/virt-sysprep.pod:503 ../df/virt-df.pod:237
-#: ../edit/virt-edit.pod:370 ../inspector/virt-inspector.pod:395
+#: ../edit/virt-edit.pod:370 ../inspector/virt-inspector.pod:410
#: ../rescue/virt-rescue.pod:336 ../resize/virt-resize.pod:713
#: ../sparsify/virt-sparsify.pod:266 ../tools/virt-list-filesystems.pl:210
#: ../tools/virt-list-partitions.pl:279 ../tools/virt-make-fs.pl:584
@@ -1087,7 +1087,7 @@ msgstr "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
#: ../fish/guestfish.pod:1300 ../fish/virt-copy-in.pod:64
#: ../fish/virt-copy-out.pod:53 ../fish/virt-tar-in.pod:62
#: ../fish/virt-tar-out.pod:55 ../fuse/guestmount.pod:332
-#: ../inspector/virt-inspector.pod:403 ../java/examples/guestfs-java.pod:62
+#: ../inspector/virt-inspector.pod:418 ../java/examples/guestfs-java.pod:62
#: ../ocaml/examples/guestfs-ocaml.pod:95 ../perl/examples/guestfs-perl.pod:56
#: ../python/examples/guestfs-python.pod:58 ../rescue/virt-rescue.pod:338
#: ../resize/virt-resize.pod:715 ../ruby/examples/guestfs-ruby.pod:52
@@ -1112,7 +1112,7 @@ msgstr ""
#: ../edit/virt-edit.pod:376 ../fish/guestfish.pod:1305
#: ../fish/virt-copy-in.pod:69 ../fish/virt-copy-out.pod:58
#: ../fish/virt-tar-in.pod:67 ../fish/virt-tar-out.pod:60
-#: ../fuse/guestmount.pod:337 ../inspector/virt-inspector.pod:407
+#: ../fuse/guestmount.pod:337 ../inspector/virt-inspector.pod:422
#: ../rescue/virt-rescue.pod:342 ../resize/virt-resize.pod:719
#: ../sparsify/virt-sparsify.pod:272 ../test-tool/libguestfs-test-tool.pod:115
#: ../tools/virt-list-filesystems.pl:216 ../tools/virt-list-partitions.pl:285
@@ -1132,7 +1132,7 @@ msgstr ""
#: ../edit/virt-edit.pod:381 ../fish/guestfish.pod:1310
#: ../fish/virt-copy-in.pod:74 ../fish/virt-copy-out.pod:63
#: ../fish/virt-tar-in.pod:72 ../fish/virt-tar-out.pod:65
-#: ../fuse/guestmount.pod:342 ../inspector/virt-inspector.pod:412
+#: ../fuse/guestmount.pod:342 ../inspector/virt-inspector.pod:427
#: ../rescue/virt-rescue.pod:347 ../resize/virt-resize.pod:724
#: ../sparsify/virt-sparsify.pod:277 ../test-tool/libguestfs-test-tool.pod:120
#: ../tools/virt-list-filesystems.pl:221 ../tools/virt-list-partitions.pl:290
@@ -1156,7 +1156,7 @@ msgstr ""
#: ../edit/virt-edit.pod:386 ../fish/guestfish.pod:1315
#: ../fish/virt-copy-in.pod:79 ../fish/virt-copy-out.pod:68
#: ../fish/virt-tar-in.pod:77 ../fish/virt-tar-out.pod:70
-#: ../fuse/guestmount.pod:347 ../inspector/virt-inspector.pod:417
+#: ../fuse/guestmount.pod:347 ../inspector/virt-inspector.pod:432
#: ../rescue/virt-rescue.pod:352 ../resize/virt-resize.pod:729
#: ../sparsify/virt-sparsify.pod:282 ../test-tool/libguestfs-test-tool.pod:125
#: ../tools/virt-list-filesystems.pl:226 ../tools/virt-list-partitions.pl:295
@@ -1428,7 +1428,7 @@ msgstr ""
#. type: =head1
#: ../cat/virt-cat.pod:152 ../cat/virt-ls.pod:443 ../edit/virt-edit.pod:179
-#: ../inspector/virt-inspector.pod:137 ../rescue/virt-rescue.pod:246
+#: ../inspector/virt-inspector.pod:144 ../rescue/virt-rescue.pod:246
msgid "OLD-STYLE COMMAND LINE ARGUMENTS"
msgstr ""
@@ -1447,7 +1447,7 @@ msgstr ""
#. type: textblock
#: ../cat/virt-cat.pod:158 ../cat/virt-ls.pod:449 ../edit/virt-edit.pod:185
-#: ../inspector/virt-inspector.pod:143 ../rescue/virt-rescue.pod:252
+#: ../inspector/virt-inspector.pod:150 ../rescue/virt-rescue.pod:252
msgid "or"
msgstr "або"
@@ -1461,7 +1461,7 @@ msgstr ""
#. type: textblock
#: ../cat/virt-cat.pod:162 ../cat/virt-ls.pod:453 ../edit/virt-edit.pod:189
-#: ../inspector/virt-inspector.pod:147 ../rescue/virt-rescue.pod:256
+#: ../inspector/virt-inspector.pod:154 ../rescue/virt-rescue.pod:256
msgid ""
"whereas in this version you should use I<-a> or I<-d> respectively to avoid "
"the confusing case where a disk image might have the same name as a guest."
@@ -1469,7 +1469,7 @@ msgstr ""
#. type: textblock
#: ../cat/virt-cat.pod:166 ../cat/virt-ls.pod:457 ../edit/virt-edit.pod:193
-#: ../inspector/virt-inspector.pod:151 ../rescue/virt-rescue.pod:260
+#: ../inspector/virt-inspector.pod:158 ../rescue/virt-rescue.pod:260
msgid "For compatibility the old style is still supported."
msgstr ""
@@ -1585,7 +1585,7 @@ msgstr ""
#. type: textblock
#: ../cat/virt-cat.pod:240 ../cat/virt-filesystems.pod:382
#: ../cat/virt-ls.pod:492 ../df/virt-df.pod:224 ../edit/virt-edit.pod:351
-#: ../fuse/guestmount.pod:314 ../inspector/virt-inspector.pod:377
+#: ../fuse/guestmount.pod:314 ../inspector/virt-inspector.pod:392
#: ../resize/virt-resize.pod:685 ../sparsify/virt-sparsify.pod:229
msgid ""
"This program returns 0 if successful, or non-zero if there was an error."
@@ -1601,7 +1601,7 @@ msgstr ""
"tar-out(1)>, L<http://libguestfs.org/>."
#. type: textblock
-#: ../cat/virt-cat.pod:258 ../inspector/virt-inspector.pod:405
+#: ../cat/virt-cat.pod:258 ../inspector/virt-inspector.pod:420
#: ../resize/virt-resize.pod:717 ../tools/virt-make-fs.pl:588
msgid "Copyright (C) 2010-2011 Red Hat Inc."
msgstr "©Red Hat Inc., 2010–2011"
@@ -4893,7 +4893,7 @@ msgstr ""
#: ../fish/guestfish.pod:1296 ../fish/virt-copy-in.pod:60
#: ../fish/virt-copy-out.pod:49 ../fish/virt-tar-in.pod:58
#: ../fish/virt-tar-out.pod:51 ../fuse/guestmount.pod:328
-#: ../inspector/virt-inspector.pod:389 ../java/examples/guestfs-java.pod:58
+#: ../inspector/virt-inspector.pod:404 ../java/examples/guestfs-java.pod:58
#: ../ocaml/examples/guestfs-ocaml.pod:91 ../perl/examples/guestfs-perl.pod:52
#: ../python/examples/guestfs-python.pod:54
#: ../ruby/examples/guestfs-ruby.pod:48 ../src/guestfs.pod:3348
@@ -22234,7 +22234,7 @@ msgid ""
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:141
+#: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:148
#, no-wrap
msgid ""
" virt-inspector disk.img [disk.img ...]\n"
@@ -22349,13 +22349,28 @@ msgid ""
"the format is always specified."
msgstr ""
+#. type: =item
+#: ../inspector/virt-inspector.pod:135
+#, fuzzy
+#| msgid "B<--parts>"
+msgid "B<--xpath> query"
+msgstr "B<--parts>"
+
#. type: textblock
-#: ../inspector/virt-inspector.pod:139
+#: ../inspector/virt-inspector.pod:137
+msgid ""
+"Perform an XPath query on the XML on stdin, and print the result on stdout. "
+"In this mode virt-inspector simply runs an XPath query; all other inspection "
+"functions are disabled. See L</XPATH QUERIES> below for some examples."
+msgstr ""
+
+#. type: textblock
+#: ../inspector/virt-inspector.pod:146
msgid "Previous versions of virt-inspector allowed you to write either:"
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:145
+#: ../inspector/virt-inspector.pod:152
#, no-wrap
msgid ""
" virt-inspector guestname\n"
@@ -22363,12 +22378,12 @@ msgid ""
msgstr ""
#. type: =head1
-#: ../inspector/virt-inspector.pod:153
+#: ../inspector/virt-inspector.pod:160
msgid "XML FORMAT"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:155
+#: ../inspector/virt-inspector.pod:162
msgid ""
"The virt-inspector XML is described precisely in a RELAX NG schema file "
"C<virt-inspector.rng> which is supplied with libguestfs. This section is "
@@ -22376,7 +22391,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:159
+#: ../inspector/virt-inspector.pod:166
msgid ""
"The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
"more E<lt>operatingsystemE<gt> elements. You would only see more than one "
@@ -22385,12 +22400,12 @@ msgid ""
msgstr ""
#. type: =head2
-#: ../inspector/virt-inspector.pod:164
+#: ../inspector/virt-inspector.pod:171
msgid "E<lt>operatingsystemE<gt>"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:166
+#: ../inspector/virt-inspector.pod:173
msgid ""
"In the E<lt>operatingsystemE<gt> tag are various optional fields that "
"describe the operating system, its architecture, the descriptive \"product "
@@ -22398,7 +22413,7 @@ msgid ""
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:170
+#: ../inspector/virt-inspector.pod:177
#, no-wrap
msgid ""
" <operatingsystems>\n"
@@ -22417,7 +22432,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:183
+#: ../inspector/virt-inspector.pod:190
msgid ""
"In brief, E<lt>nameE<gt> is the class of operating system (something like "
"C<linux> or C<windows>), E<lt>distroE<gt> is the distribution (eg. C<fedora> "
@@ -22428,7 +22443,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:191
+#: ../inspector/virt-inspector.pod:198
msgid ""
"The E<lt>rootE<gt> element is the root filesystem device, but from the point "
"of view of libguestfs (block devices may have completely different names "
@@ -22436,12 +22451,12 @@ msgid ""
msgstr ""
#. type: =head2
-#: ../inspector/virt-inspector.pod:195
+#: ../inspector/virt-inspector.pod:202
msgid "E<lt>mountpointsE<gt>"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:197
+#: ../inspector/virt-inspector.pod:204
msgid ""
"Un*x-like guests typically have multiple filesystems which are mounted at "
"various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
@@ -22449,7 +22464,7 @@ msgid ""
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:201
+#: ../inspector/virt-inspector.pod:208
#, no-wrap
msgid ""
" <operatingsystems>\n"
@@ -22463,7 +22478,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:209
+#: ../inspector/virt-inspector.pod:216
msgid ""
"As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
"and may have completely different names inside the guest. Only mountable "
@@ -22471,12 +22486,12 @@ msgid ""
msgstr ""
#. type: =head2
-#: ../inspector/virt-inspector.pod:214
+#: ../inspector/virt-inspector.pod:221
msgid "E<lt>filesystemsE<gt>"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:216
+#: ../inspector/virt-inspector.pod:223
msgid ""
"E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
"filesystems belonging to the guest, including swap and empty partitions. "
@@ -22485,12 +22500,12 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:222
+#: ../inspector/virt-inspector.pod:229
msgid "You might see something like this:"
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:224
+#: ../inspector/virt-inspector.pod:231
#, no-wrap
msgid ""
" <operatingsystems>\n"
@@ -22506,19 +22521,19 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:234
+#: ../inspector/virt-inspector.pod:241
msgid ""
"The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
"the label, and the UUID."
msgstr ""
#. type: =head2
-#: ../inspector/virt-inspector.pod:237
+#: ../inspector/virt-inspector.pod:244
msgid "E<lt>applicationsE<gt>"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:239
+#: ../inspector/virt-inspector.pod:246
msgid ""
"The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
"and E<lt>applicationsE<gt> describe applications installed in the virtual "
@@ -22526,26 +22541,26 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:243
+#: ../inspector/virt-inspector.pod:250
msgid ""
"E<lt>package_formatE<gt>, if present, describes the packaging system used. "
"Typical values would be C<rpm> and C<deb>."
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:246
+#: ../inspector/virt-inspector.pod:253
msgid ""
"E<lt>package_managementE<gt>, if present, describes the package manager. "
"Typical values include C<yum>, C<up2date> and C<apt>"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:249
+#: ../inspector/virt-inspector.pod:256
msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:252
+#: ../inspector/virt-inspector.pod:259
#, no-wrap
msgid ""
" <operatingsystems>\n"
@@ -22561,7 +22576,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:262
+#: ../inspector/virt-inspector.pod:269
msgid ""
"The version and release fields may not be available for some types guests. "
"Other fields are possible, see L<guestfs(3)/"
@@ -22569,19 +22584,19 @@ msgid ""
msgstr ""
#. type: =head2
-#: ../inspector/virt-inspector.pod:266
+#: ../inspector/virt-inspector.pod:273
msgid "E<lt>drive_mappingsE<gt>"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:268
+#: ../inspector/virt-inspector.pod:275
msgid ""
"For operating systems like Windows which use drive letters, virt-inspector "
"is able to find out how drive letters map to filesystems."
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:272
+#: ../inspector/virt-inspector.pod:279
#, no-wrap
msgid ""
" <operatingsystems>\n"
@@ -22595,7 +22610,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:280
+#: ../inspector/virt-inspector.pod:287
msgid ""
"In the example above, drive C maps to the filesystem on the second partition "
"on the first disk, and drive E maps to the filesystem on the first partition "
@@ -22603,7 +22618,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:284
+#: ../inspector/virt-inspector.pod:291
msgid ""
"Note that this only covers permanent local filesystem mappings, not things "
"like network shares. Furthermore NTFS volume mount points may not be listed "
@@ -22611,12 +22626,12 @@ msgid ""
msgstr ""
#. type: =head2
-#: ../inspector/virt-inspector.pod:288
+#: ../inspector/virt-inspector.pod:295
msgid "E<lt>iconE<gt>"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:290
+#: ../inspector/virt-inspector.pod:297
msgid ""
"Virt-inspector is sometimes able to extract an icon or logo for the guest. "
"The icon is returned as base64-encoded PNG data. Note that the icon can be "
@@ -22624,7 +22639,7 @@ msgid ""
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:294
+#: ../inspector/virt-inspector.pod:301
#, no-wrap
msgid ""
" <operatingsystems>\n"
@@ -22638,7 +22653,7 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:302
+#: ../inspector/virt-inspector.pod:309
msgid ""
"To display the icon, you have to extract it and convert the base64 data back "
"to a binary file. Use an XPath query or simply an editor to extract the "
@@ -22647,7 +22662,7 @@ msgid ""
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:307
+#: ../inspector/virt-inspector.pod:314
#, no-wrap
msgid ""
" base64 -i -d < icon.data > icon.png\n"
@@ -22655,19 +22670,19 @@ msgid ""
msgstr ""
#. type: =head2
-#: ../inspector/virt-inspector.pod:309
+#: ../inspector/virt-inspector.pod:316
msgid "INSPECTING INSTALL DISKS, LIVE CDs"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:311
+#: ../inspector/virt-inspector.pod:318
msgid ""
"Virt-inspector can detect some operating system installers on install disks, "
"live CDs, bootable USB keys and more."
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:314
+#: ../inspector/virt-inspector.pod:321
msgid ""
"In this case the E<lt>formatE<gt> tag will contain C<installer> and other "
"fields may be present to indicate a live CD, network installer, or one part "
@@ -22675,7 +22690,7 @@ msgid ""
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:318
+#: ../inspector/virt-inspector.pod:325
#, no-wrap
msgid ""
" <operatingsystems>\n"
@@ -22693,22 +22708,33 @@ msgid ""
msgstr ""
#. type: =head1
-#: ../inspector/virt-inspector.pod:330
-msgid "USING XPATH"
+#: ../inspector/virt-inspector.pod:337
+msgid "XPATH QUERIES"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:332
+#: ../inspector/virt-inspector.pod:339
msgid ""
-"You can use the XPath query language to select parts of the XML. We "
-"recommend using C<xmlstarlet> to perform XPath queries from the command line."
+"Virt-inspector includes built in support for running XPath queries. The "
+"reason for including XPath support directly in virt-inspector is simply that "
+"there are no good and widely available command line programs that can do "
+"XPath queries. The only good one is L<xmlstarlet(1)> and that is not "
+"available on Red Hat Enterprise Linux."
+msgstr ""
+
+#. type: textblock
+#: ../inspector/virt-inspector.pod:346
+msgid ""
+"To perform an XPath query, use the I<--xpath> option. Note that in this "
+"mode, virt-inspector simply reads XML from stdin and outputs the query "
+"result on stdout. All other inspection features are disabled in this mode."
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:338
+#: ../inspector/virt-inspector.pod:353
#, no-wrap
msgid ""
-" $ virt-inspector -d Guest | xmlstarlet sel -t -c '//filesystems'\n"
+" $ virt-inspector -d Guest | virt-inspector --xpath '//filesystems'\n"
" <filesystems>\n"
" <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
" <type>ext4</type>\n"
@@ -22717,32 +22743,32 @@ msgid ""
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:344
+#: ../inspector/virt-inspector.pod:359
#, no-wrap
msgid ""
" $ virt-inspector -d Guest | \\\n"
-" xmlstarlet sel -t -c \"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
+" virt-inspector --xpath \"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
" ext4\n"
"\n"
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:348
+#: ../inspector/virt-inspector.pod:363
#, no-wrap
msgid ""
" $ virt-inspector -d Guest | \\\n"
-" xmlstarlet sel -t -v '//icon' | base64 -i -d | display -\n"
+" virt-inspector --xpath 'string(//icon)' | base64 -i -d | display -\n"
" [displays the guest icon, if there is one]\n"
"\n"
msgstr ""
#. type: =head1
-#: ../inspector/virt-inspector.pod:359
+#: ../inspector/virt-inspector.pod:374
msgid "OLD VERSIONS OF VIRT-INSPECTOR"
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:361
+#: ../inspector/virt-inspector.pod:376
msgid ""
"Early versions of libguestfs shipped with a different virt-inspector program "
"written in Perl (the current version is written in C). The XML output of "
@@ -22751,20 +22777,20 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:366
+#: ../inspector/virt-inspector.pod:381
msgid ""
"The old virt-inspector is no longer supported or shipped with libguestfs."
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:369
+#: ../inspector/virt-inspector.pod:384
msgid ""
"To confuse matters further, in Red Hat Enterprise Linux 6 we ship two "
"versions of virt-inspector with different names:"
msgstr ""
#. type: verbatim
-#: ../inspector/virt-inspector.pod:372
+#: ../inspector/virt-inspector.pod:387
#, no-wrap
msgid ""
" virt-inspector Old Perl version.\n"
@@ -22773,14 +22799,14 @@ msgid ""
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:382
+#: ../inspector/virt-inspector.pod:397
msgid ""
"L<guestfs(3)>, L<guestfish(1)>, L<http://www.w3.org/TR/xpath/>, L<base64(1)"
">, L<xmlstarlet(1)>, L<http://libguestfs.org/>."
msgstr ""
#. type: textblock
-#: ../inspector/virt-inspector.pod:399
+#: ../inspector/virt-inspector.pod:414
msgid "Matthew Booth L<mbooth at redhat.com>"
msgstr ""
diff --git a/po-docs/uk/Makefile.in b/po-docs/uk/Makefile.in
index d3d80c0..1d934d6 100644
--- a/po-docs/uk/Makefile.in
+++ b/po-docs/uk/Makefile.in
@@ -911,7 +911,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/po-docs/uk/guestfish.1 b/po-docs/uk/guestfish.1
index a15a1bb..bfe2f65 100644
--- a/po-docs/uk/guestfish.1
+++ b/po-docs/uk/guestfish.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "guestfish 1"
-.TH guestfish 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH guestfish 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/guestfs.3 b/po-docs/uk/guestfs.3
index 16d83d2..4818565 100644
--- a/po-docs/uk/guestfs.3
+++ b/po-docs/uk/guestfs.3
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "guestfs 3"
-.TH guestfs 3 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH guestfs 3 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/guestmount.1 b/po-docs/uk/guestmount.1
index cd5c2ef..0133d10 100644
--- a/po-docs/uk/guestmount.1
+++ b/po-docs/uk/guestmount.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "guestmount 1"
-.TH guestmount 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH guestmount 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/libguestfs-test-tool.1 b/po-docs/uk/libguestfs-test-tool.1
index 7a44587..f223560 100644
--- a/po-docs/uk/libguestfs-test-tool.1
+++ b/po-docs/uk/libguestfs-test-tool.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "libguestfs-test-tool 1"
-.TH libguestfs-test-tool 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH libguestfs-test-tool 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/virt-alignment-scan.1 b/po-docs/uk/virt-alignment-scan.1
index 3d6f05c..3b39c39 100644
--- a/po-docs/uk/virt-alignment-scan.1
+++ b/po-docs/uk/virt-alignment-scan.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-alignment-scan 1"
-.TH virt-alignment-scan 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-alignment-scan 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/virt-cat.1 b/po-docs/uk/virt-cat.1
index 76d1539..977e013 100644
--- a/po-docs/uk/virt-cat.1
+++ b/po-docs/uk/virt-cat.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-cat 1"
-.TH virt-cat 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-cat 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/virt-copy-in.1 b/po-docs/uk/virt-copy-in.1
index e01b605..8944e7e 100644
--- a/po-docs/uk/virt-copy-in.1
+++ b/po-docs/uk/virt-copy-in.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-copy-in 1"
-.TH virt-copy-in 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-copy-in 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/virt-copy-out.1 b/po-docs/uk/virt-copy-out.1
index d21163b..00491ba 100644
--- a/po-docs/uk/virt-copy-out.1
+++ b/po-docs/uk/virt-copy-out.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-copy-out 1"
-.TH virt-copy-out 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-copy-out 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/virt-df.1 b/po-docs/uk/virt-df.1
index 4c798d4..ef5f2f3 100644
--- a/po-docs/uk/virt-df.1
+++ b/po-docs/uk/virt-df.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-df 1"
-.TH virt-df 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-df 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/virt-edit.1 b/po-docs/uk/virt-edit.1
index 6c623c8..28ba846 100644
--- a/po-docs/uk/virt-edit.1
+++ b/po-docs/uk/virt-edit.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-edit 1"
-.TH virt-edit 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-edit 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/virt-filesystems.1 b/po-docs/uk/virt-filesystems.1
index 14922cd..002e997 100644
--- a/po-docs/uk/virt-filesystems.1
+++ b/po-docs/uk/virt-filesystems.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-filesystems 1"
-.TH virt-filesystems 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-filesystems 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/virt-inspector.1 b/po-docs/uk/virt-inspector.1
index 81db61f..db180bf 100644
--- a/po-docs/uk/virt-inspector.1
+++ b/po-docs/uk/virt-inspector.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-inspector 1"
-.TH virt-inspector 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-inspector 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -197,6 +197,11 @@ Enable verbose messages for debugging.
.IP "\fB\-x\fR" 4
.IX Item "-x"
Enable tracing of libguestfs \s-1API\s0 calls.
+.IP "\fB\-\-xpath\fR query" 4
+.IX Item "--xpath query"
+Perform an XPath query on the \s-1XML\s0 on stdin, and print the result on stdout.
+In this mode virt-inspector simply runs an XPath query; all other inspection
+functions are disabled. See \*(L"\s-1XPATH\s0 \s-1QUERIES\s0\*(R" below for some examples.
.SH "OLD-STYLE COMMAND LINE ARGUMENTS"
.IX Header "OLD-STYLE COMMAND LINE ARGUMENTS"
Previous versions of virt-inspector allowed you to write either:
@@ -395,27 +400,33 @@ of a multipart \s-1CD\s0. For example:
\& <format>installer</format>
\& <live/>
.Ve
-.SH "USING XPATH"
-.IX Header "USING XPATH"
-You can use the XPath query language to select parts of the \s-1XML\s0. We
-recommend using \f(CW\*(C`xmlstarlet\*(C'\fR to perform XPath queries from the command
-line.
+.SH "XPATH QUERIES"
+.IX Header "XPATH QUERIES"
+Virt-inspector includes built in support for running XPath queries. The
+reason for including XPath support directly in virt-inspector is simply that
+there are no good and widely available command line programs that can do
+XPath queries. The only good one is \fIxmlstarlet\fR\|(1) and that is not
+available on Red Hat Enterprise Linux.
+.PP
+To perform an XPath query, use the \fI\-\-xpath\fR option. Note that in this
+mode, virt-inspector simply reads \s-1XML\s0 from stdin and outputs the query
+result on stdout. All other inspection features are disabled in this mode.
.PP
Приклад:
.PP
.Vb 5
-\& $ virt\-inspector \-d Guest | xmlstarlet sel \-t \-c \*(Aq//filesystems\*(Aq
+\& $ virt\-inspector \-d Guest | virt\-inspector \-\-xpath \*(Aq//filesystems\*(Aq
\& <filesystems>
\& <filesystem dev="/dev/vg_f13x64/lv_root">
\& <type>ext4</type>
\& [...]
\&
\& $ virt\-inspector \-d Guest | \e
-\& xmlstarlet sel \-t \-c "string(//filesystem[@dev=\*(Aq/dev/sda1\*(Aq]/type)"
+\& virt\-inspector \-\-xpath "string(//filesystem[@dev=\*(Aq/dev/sda1\*(Aq]/type)"
\& ext4
\&
\& $ virt\-inspector \-d Guest | \e
-\& xmlstarlet sel \-t \-v \*(Aq//icon\*(Aq | base64 \-i \-d | display \-
+\& virt\-inspector \-\-xpath \*(Aqstring(//icon)\*(Aq | base64 \-i \-d | display \-
\& [displays the guest icon, if there is one]
.Ve
.SH "SHELL QUOTING"
diff --git a/po-docs/uk/virt-inspector.pod b/po-docs/uk/virt-inspector.pod
index 16bb6bc..58cb089 100644
--- a/po-docs/uk/virt-inspector.pod
+++ b/po-docs/uk/virt-inspector.pod
@@ -129,6 +129,12 @@ Enable verbose messages for debugging.
Enable tracing of libguestfs API calls.
+=item B<--xpath> query
+
+Perform an XPath query on the XML on stdin, and print the result on stdout.
+In this mode virt-inspector simply runs an XPath query; all other inspection
+functions are disabled. See L</XPATH QUERIES> below for some examples.
+
=back
=head1 OLD-STYLE COMMAND LINE ARGUMENTS
@@ -318,26 +324,32 @@ of a multipart CD. For example:
<format>installer</format>
<live/>
-=head1 USING XPATH
+=head1 XPATH QUERIES
+
+Virt-inspector includes built in support for running XPath queries. The
+reason for including XPath support directly in virt-inspector is simply that
+there are no good and widely available command line programs that can do
+XPath queries. The only good one is L<xmlstarlet(1)> and that is not
+available on Red Hat Enterprise Linux.
-You can use the XPath query language to select parts of the XML. We
-recommend using C<xmlstarlet> to perform XPath queries from the command
-line.
+To perform an XPath query, use the I<--xpath> option. Note that in this
+mode, virt-inspector simply reads XML from stdin and outputs the query
+result on stdout. All other inspection features are disabled in this mode.
Приклад:
- $ virt-inspector -d Guest | xmlstarlet sel -t -c '//filesystems'
+ $ virt-inspector -d Guest | virt-inspector --xpath '//filesystems'
<filesystems>
<filesystem dev="/dev/vg_f13x64/lv_root">
<type>ext4</type>
[...]
$ virt-inspector -d Guest | \
- xmlstarlet sel -t -c "string(//filesystem[@dev='/dev/sda1']/type)"
+ virt-inspector --xpath "string(//filesystem[@dev='/dev/sda1']/type)"
ext4
$ virt-inspector -d Guest | \
- xmlstarlet sel -t -v '//icon' | base64 -i -d | display -
+ virt-inspector --xpath 'string(//icon)' | base64 -i -d | display -
[displays the guest icon, if there is one]
=head1 SHELL QUOTING
diff --git a/po-docs/uk/virt-list-filesystems.1 b/po-docs/uk/virt-list-filesystems.1
index 6641d38..1a2fd11 100644
--- a/po-docs/uk/virt-list-filesystems.1
+++ b/po-docs/uk/virt-list-filesystems.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-list-filesystems.pl 1"
-.TH virt-list-filesystems.pl 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-list-filesystems.pl 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/virt-list-partitions.1 b/po-docs/uk/virt-list-partitions.1
index 0e1c568..87a02ed 100644
--- a/po-docs/uk/virt-list-partitions.1
+++ b/po-docs/uk/virt-list-partitions.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-list-partitions.pl 1"
-.TH virt-list-partitions.pl 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-list-partitions.pl 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/virt-ls.1 b/po-docs/uk/virt-ls.1
index 7ec3fc7..181d4ee 100644
--- a/po-docs/uk/virt-ls.1
+++ b/po-docs/uk/virt-ls.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-ls 1"
-.TH virt-ls 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-ls 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/virt-make-fs.1 b/po-docs/uk/virt-make-fs.1
index e4bfbb2..f5e643b 100644
--- a/po-docs/uk/virt-make-fs.1
+++ b/po-docs/uk/virt-make-fs.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-make-fs.pl 1"
-.TH virt-make-fs.pl 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-make-fs.pl 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/virt-rescue.1 b/po-docs/uk/virt-rescue.1
index f592969..2a886ea 100644
--- a/po-docs/uk/virt-rescue.1
+++ b/po-docs/uk/virt-rescue.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-rescue 1"
-.TH virt-rescue 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-rescue 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/virt-resize.1 b/po-docs/uk/virt-resize.1
index b4e1db2..0f58cbf 100644
--- a/po-docs/uk/virt-resize.1
+++ b/po-docs/uk/virt-resize.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-resize 1"
-.TH virt-resize 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-resize 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/virt-sparsify.1 b/po-docs/uk/virt-sparsify.1
index 2e975f1..eb27bfe 100644
--- a/po-docs/uk/virt-sparsify.1
+++ b/po-docs/uk/virt-sparsify.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-sparsify 1"
-.TH virt-sparsify 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-sparsify 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/virt-sysprep.1 b/po-docs/uk/virt-sysprep.1
index 056ba67..1c8dee3 100644
--- a/po-docs/uk/virt-sysprep.1
+++ b/po-docs/uk/virt-sysprep.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-sysprep 1"
-.TH virt-sysprep 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-sysprep 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/virt-tar-in.1 b/po-docs/uk/virt-tar-in.1
index 3a07049..b86d3ec 100644
--- a/po-docs/uk/virt-tar-in.1
+++ b/po-docs/uk/virt-tar-in.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-tar-in 1"
-.TH virt-tar-in 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-tar-in 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/virt-tar-out.1 b/po-docs/uk/virt-tar-out.1
index 2a1a7db..54c91a1 100644
--- a/po-docs/uk/virt-tar-out.1
+++ b/po-docs/uk/virt-tar-out.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-tar-out 1"
-.TH virt-tar-out 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-tar-out 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/virt-tar.1 b/po-docs/uk/virt-tar.1
index b3e8cec..2d81ed0 100644
--- a/po-docs/uk/virt-tar.1
+++ b/po-docs/uk/virt-tar.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-tar.pl 1"
-.TH virt-tar.pl 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-tar.pl 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po-docs/uk/virt-win-reg.1 b/po-docs/uk/virt-win-reg.1
index 5bc7963..a42666b 100644
--- a/po-docs/uk/virt-win-reg.1
+++ b/po-docs/uk/virt-win-reg.1
@@ -62,7 +62,7 @@
.\" ========================================================================
.\"
.IX Title "virt-win-reg.pl 1"
-.TH virt-win-reg.pl 1 "2011-11-01" "libguestfs-1.15.1" "Virtualization Support"
+.TH virt-win-reg.pl 1 "2011-11-03" "libguestfs-1.15.2" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/po/en_GB.gmo b/po/en_GB.gmo
index fbdd780..a65f600 100644
Binary files a/po/en_GB.gmo and b/po/en_GB.gmo differ
diff --git a/po/en_GB.po b/po/en_GB.po
index 6aa4ce3..d7d7934 100644
--- a/po/en_GB.po
+++ b/po/en_GB.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: libguestfs\n"
"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
"component=libguestfs&product=Virtualization+Tools\n"
-"POT-Creation-Date: 2011-11-01 14:19+0000\n"
+"POT-Creation-Date: 2011-11-03 14:10+0000\n"
"PO-Revision-Date: 2011-10-27 09:11+0000\n"
"Last-Translator: rjones <rjones at redhat.com>\n"
"Language-Team: English (United Kingdom) (http://www.transifex.net/projects/p/"
@@ -22,7 +22,7 @@ msgstr ""
#: align/scan.c:68 cat/virt-cat.c:61 cat/virt-filesystems.c:100
#: cat/virt-ls.c:99 df/main.c:70 edit/virt-edit.c:73 fish/fish.c:101
-#: fuse/guestmount.c:908 inspector/virt-inspector.c:72 rescue/virt-rescue.c:62
+#: fuse/guestmount.c:908 inspector/virt-inspector.c:78 rescue/virt-rescue.c:62
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Try `%s --help' for more information.\n"
@@ -50,7 +50,7 @@ msgstr ""
#: align/scan.c:127 cat/virt-cat.c:121 cat/virt-filesystems.c:203
#: cat/virt-ls.c:192 df/domains.c:429 df/main.c:136 edit/virt-edit.c:141
-#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:132
+#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:140
#: rescue/virt-rescue.c:142
#, c-format
msgid "guestfs_create: failed to create handle\n"
@@ -58,7 +58,7 @@ msgstr "guestfs_create: failed to create handle\n"
#: align/scan.c:145 cat/virt-cat.c:143 cat/virt-filesystems.c:257
#: cat/virt-ls.c:242 df/main.c:160 edit/virt-edit.c:163 fish/fish.c:279
-#: fuse/guestmount.c:1061 inspector/virt-inspector.c:154
+#: fuse/guestmount.c:1061 inspector/virt-inspector.c:164
#: rescue/virt-rescue.c:179
#, c-format
msgid "%s: unknown long option: %s (%d)\n"
@@ -2724,8 +2724,8 @@ msgstr ""
msgid "%s: you must specify a mountpoint in the host filesystem\n"
msgstr ""
-#: inspector/virt-inspector.c:76
-#, c-format
+#: inspector/virt-inspector.c:82
+#, fuzzy, c-format
msgid ""
"%s: display information about a virtual machine\n"
"Copyright (C) 2010 Red Hat Inc.\n"
@@ -2743,10 +2743,33 @@ msgid ""
" -v|--verbose Verbose messages\n"
" -V|--version Display version and exit\n"
" -x Trace libguestfs API calls\n"
+" --xpath query Perform an XPath query\n"
"For more information, see the manpage %s(1).\n"
msgstr ""
+"%s: display files in a virtual machine\n"
+"Copyright (C) 2010 Red Hat Inc.\n"
+"Usage:\n"
+" %s [--options] -d domname file [file ...]\n"
+" %s [--options] -a disc.img [-a disc.img ...] file [file ...]\n"
+"Options:\n"
+" -a|--add image Add image\n"
+" -c|--connect uri Specify libvirt URI for -d option\n"
+" -d|--domain guest Add disks from libvirt guest\n"
+" --echo-keys Don't turn off echo for passphrases\n"
+" --format[=raw|..] Force disc format for -a option\n"
+" --help Display brief help\n"
+" --keys-from-stdin Read passphrases from stdin\n"
+" -v|--verbose Verbose messages\n"
+" -V|--version Display version and exit\n"
+" -x Trace libguestfs API calls\n"
+"For more information, see the manpage %s(1).\n"
-#: inspector/virt-inspector.c:263
+#: inspector/virt-inspector.c:255
+#, c-format
+msgid "%s: cannot use --xpath together with other options.\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:288
#, c-format
msgid ""
"%s: no operating system could be detected inside this disk image.\n"
@@ -2763,21 +2786,56 @@ msgid ""
"information about the disk image as possible.\n"
msgstr ""
-#: inspector/virt-inspector.c:288
+#: inspector/virt-inspector.c:313
#, c-format
msgid "%s: XML write error at \"%s\": %m\n"
msgstr ""
-#: inspector/virt-inspector.c:300
+#: inspector/virt-inspector.c:325
#, c-format
msgid "%s: xmlOutputBufferCreateFd: failed to open stdout\n"
msgstr ""
-#: inspector/virt-inspector.c:308
+#: inspector/virt-inspector.c:333
#, c-format
msgid "%s: xmlNewTextWriter: failed to create libxml2 writer\n"
msgstr ""
+#: inspector/virt-inspector.c:827
+#, c-format
+msgid "%s: unable to parse XML from stdin\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:833
+#, c-format
+msgid "%s: unable to create new XPath context\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:840
+#, c-format
+msgid "%s: unable to evaluate XPath expression\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:851
+#, c-format
+msgid "%s: xmlSaveToFd failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:858
+#, c-format
+msgid "%s: xmlNewDoc failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:863
+#, c-format
+msgid "%s: xmlCopyNode failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:870
+#, c-format
+msgid "%s: xmlSaveDoc failed\n"
+msgstr ""
+
#: perl/lib/Sys/Guestfs/Lib.pm:158
msgid "open_guest: first parameter must be a string or an arrayref"
msgstr ""
diff --git a/po/es.gmo b/po/es.gmo
index 1e77757..01e5881 100644
Binary files a/po/es.gmo and b/po/es.gmo differ
diff --git a/po/es.po b/po/es.po
index 4f6ec79..1ede021 100644
--- a/po/es.po
+++ b/po/es.po
@@ -10,7 +10,7 @@ msgstr ""
"Project-Id-Version: libguestfs\n"
"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
"component=libguestfs&product=Virtualization+Tools\n"
-"POT-Creation-Date: 2011-11-01 14:19+0000\n"
+"POT-Creation-Date: 2011-11-03 14:10+0000\n"
"PO-Revision-Date: 2011-10-27 09:11+0000\n"
"Last-Translator: rjones <rjones at redhat.com>\n"
"Language-Team: Spanish (Castilian) <trans-es at lists.fedoraproject.org>\n"
@@ -22,7 +22,7 @@ msgstr ""
#: align/scan.c:68 cat/virt-cat.c:61 cat/virt-filesystems.c:100
#: cat/virt-ls.c:99 df/main.c:70 edit/virt-edit.c:73 fish/fish.c:101
-#: fuse/guestmount.c:908 inspector/virt-inspector.c:72 rescue/virt-rescue.c:62
+#: fuse/guestmount.c:908 inspector/virt-inspector.c:78 rescue/virt-rescue.c:62
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Intente con `%s --help' para más información.\n"
@@ -50,7 +50,7 @@ msgstr ""
#: align/scan.c:127 cat/virt-cat.c:121 cat/virt-filesystems.c:203
#: cat/virt-ls.c:192 df/domains.c:429 df/main.c:136 edit/virt-edit.c:141
-#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:132
+#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:140
#: rescue/virt-rescue.c:142
#, c-format
msgid "guestfs_create: failed to create handle\n"
@@ -58,7 +58,7 @@ msgstr "guestfs_create: falló al crear manipulador\n"
#: align/scan.c:145 cat/virt-cat.c:143 cat/virt-filesystems.c:257
#: cat/virt-ls.c:242 df/main.c:160 edit/virt-edit.c:163 fish/fish.c:279
-#: fuse/guestmount.c:1061 inspector/virt-inspector.c:154
+#: fuse/guestmount.c:1061 inspector/virt-inspector.c:164
#: rescue/virt-rescue.c:179
#, c-format
msgid "%s: unknown long option: %s (%d)\n"
@@ -2978,8 +2978,8 @@ msgid "%s: you must specify a mountpoint in the host filesystem\n"
msgstr ""
"%s: debe indicar un punto de montaje en el sistema de archivos del equipo\n"
-#: inspector/virt-inspector.c:76
-#, c-format
+#: inspector/virt-inspector.c:82
+#, fuzzy, c-format
msgid ""
"%s: display information about a virtual machine\n"
"Copyright (C) 2010 Red Hat Inc.\n"
@@ -2997,6 +2997,7 @@ msgid ""
" -v|--verbose Verbose messages\n"
" -V|--version Display version and exit\n"
" -x Trace libguestfs API calls\n"
+" --xpath query Perform an XPath query\n"
"For more information, see the manpage %s(1).\n"
msgstr ""
"%s: muestra información relacionada con una máquina virtual\n"
@@ -3018,7 +3019,12 @@ msgstr ""
" -x Rastrea llamadas API de libguestfs\n"
"Para obtener mayor información, consulte la página man %s(1).\n"
-#: inspector/virt-inspector.c:263
+#: inspector/virt-inspector.c:255
+#, c-format
+msgid "%s: cannot use --xpath together with other options.\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:288
#, c-format
msgid ""
"%s: no operating system could be detected inside this disk image.\n"
@@ -3051,21 +3057,56 @@ msgstr ""
" mayor cantidad de información relacionada con la imagen de disco que le sea "
"posible.\n"
-#: inspector/virt-inspector.c:288
+#: inspector/virt-inspector.c:313
#, c-format
msgid "%s: XML write error at \"%s\": %m\n"
msgstr "%s: error de escritura XML en \"%s\": %m\n"
-#: inspector/virt-inspector.c:300
+#: inspector/virt-inspector.c:325
#, c-format
msgid "%s: xmlOutputBufferCreateFd: failed to open stdout\n"
msgstr "%s: xmlOutputBufferCreateFd: falló al abrir stdout\n"
-#: inspector/virt-inspector.c:308
+#: inspector/virt-inspector.c:333
#, c-format
msgid "%s: xmlNewTextWriter: failed to create libxml2 writer\n"
msgstr "%s: xmlNewTextWriter: falló al crear escritor libxml2\n"
+#: inspector/virt-inspector.c:827
+#, fuzzy, c-format
+msgid "%s: unable to parse XML from stdin\n"
+msgstr "no es posible analizar la información XML devuelta por libvirt"
+
+#: inspector/virt-inspector.c:833
+#, fuzzy, c-format
+msgid "%s: unable to create new XPath context\n"
+msgstr "no es posible crear un nuevo contexto XPath"
+
+#: inspector/virt-inspector.c:840
+#, fuzzy, c-format
+msgid "%s: unable to evaluate XPath expression\n"
+msgstr "no es posible evaluar la expression XPath"
+
+#: inspector/virt-inspector.c:851
+#, c-format
+msgid "%s: xmlSaveToFd failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:858
+#, c-format
+msgid "%s: xmlNewDoc failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:863
+#, c-format
+msgid "%s: xmlCopyNode failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:870
+#, c-format
+msgid "%s: xmlSaveDoc failed\n"
+msgstr ""
+
#: perl/lib/Sys/Guestfs/Lib.pm:158
msgid "open_guest: first parameter must be a string or an arrayref"
msgstr ""
diff --git a/po/gu.gmo b/po/gu.gmo
index 3f70664..a9f071c 100644
Binary files a/po/gu.gmo and b/po/gu.gmo differ
diff --git a/po/gu.po b/po/gu.po
index 3feeb96..d04204f 100644
--- a/po/gu.po
+++ b/po/gu.po
@@ -10,7 +10,7 @@ msgstr ""
"Project-Id-Version: libguestfs\n"
"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
"component=libguestfs&product=Virtualization+Tools\n"
-"POT-Creation-Date: 2011-11-01 14:19+0000\n"
+"POT-Creation-Date: 2011-11-03 14:10+0000\n"
"PO-Revision-Date: 2011-10-27 09:11+0000\n"
"Last-Translator: rjones <rjones at redhat.com>\n"
"Language-Team: Gujarati <trans-gu at lists.fedoraproject.org>\n"
@@ -22,7 +22,7 @@ msgstr ""
#: align/scan.c:68 cat/virt-cat.c:61 cat/virt-filesystems.c:100
#: cat/virt-ls.c:99 df/main.c:70 edit/virt-edit.c:73 fish/fish.c:101
-#: fuse/guestmount.c:908 inspector/virt-inspector.c:72 rescue/virt-rescue.c:62
+#: fuse/guestmount.c:908 inspector/virt-inspector.c:78 rescue/virt-rescue.c:62
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "વધારે જાણકારી માટે `%s --help' નો પ્રયત્ન કરો.\n"
@@ -50,7 +50,7 @@ msgstr ""
#: align/scan.c:127 cat/virt-cat.c:121 cat/virt-filesystems.c:203
#: cat/virt-ls.c:192 df/domains.c:429 df/main.c:136 edit/virt-edit.c:141
-#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:132
+#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:140
#: rescue/virt-rescue.c:142
#, c-format
msgid "guestfs_create: failed to create handle\n"
@@ -58,7 +58,7 @@ msgstr "guestfs_create: હેન્ડલ ને બનાવવાનું
#: align/scan.c:145 cat/virt-cat.c:143 cat/virt-filesystems.c:257
#: cat/virt-ls.c:242 df/main.c:160 edit/virt-edit.c:163 fish/fish.c:279
-#: fuse/guestmount.c:1061 inspector/virt-inspector.c:154
+#: fuse/guestmount.c:1061 inspector/virt-inspector.c:164
#: rescue/virt-rescue.c:179
#, c-format
msgid "%s: unknown long option: %s (%d)\n"
@@ -2663,7 +2663,7 @@ msgstr ""
msgid "%s: you must specify a mountpoint in the host filesystem\n"
msgstr "%s: યજમાન ફાઇલસિસ્ટમમાં માઉન્ટબિંદુને સ્પષ્ટ કરવુ જ પડશે\n"
-#: inspector/virt-inspector.c:76
+#: inspector/virt-inspector.c:82
#, c-format
msgid ""
"%s: display information about a virtual machine\n"
@@ -2682,10 +2682,16 @@ msgid ""
" -v|--verbose Verbose messages\n"
" -V|--version Display version and exit\n"
" -x Trace libguestfs API calls\n"
+" --xpath query Perform an XPath query\n"
"For more information, see the manpage %s(1).\n"
msgstr ""
-#: inspector/virt-inspector.c:263
+#: inspector/virt-inspector.c:255
+#, c-format
+msgid "%s: cannot use --xpath together with other options.\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:288
#, c-format
msgid ""
"%s: no operating system could be detected inside this disk image.\n"
@@ -2702,21 +2708,56 @@ msgid ""
"information about the disk image as possible.\n"
msgstr ""
-#: inspector/virt-inspector.c:288
+#: inspector/virt-inspector.c:313
#, c-format
msgid "%s: XML write error at \"%s\": %m\n"
msgstr ""
-#: inspector/virt-inspector.c:300
+#: inspector/virt-inspector.c:325
#, c-format
msgid "%s: xmlOutputBufferCreateFd: failed to open stdout\n"
msgstr ""
-#: inspector/virt-inspector.c:308
+#: inspector/virt-inspector.c:333
#, c-format
msgid "%s: xmlNewTextWriter: failed to create libxml2 writer\n"
msgstr ""
+#: inspector/virt-inspector.c:827
+#, c-format
+msgid "%s: unable to parse XML from stdin\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:833
+#, c-format
+msgid "%s: unable to create new XPath context\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:840
+#, c-format
+msgid "%s: unable to evaluate XPath expression\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:851
+#, c-format
+msgid "%s: xmlSaveToFd failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:858
+#, c-format
+msgid "%s: xmlNewDoc failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:863
+#, c-format
+msgid "%s: xmlCopyNode failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:870
+#, c-format
+msgid "%s: xmlSaveDoc failed\n"
+msgstr ""
+
#: perl/lib/Sys/Guestfs/Lib.pm:158
msgid "open_guest: first parameter must be a string or an arrayref"
msgstr ""
diff --git a/po/hi.gmo b/po/hi.gmo
index 0fa3303..88215a9 100644
Binary files a/po/hi.gmo and b/po/hi.gmo differ
diff --git a/po/hi.po b/po/hi.po
index 0f7bb1a..b51da58 100644
--- a/po/hi.po
+++ b/po/hi.po
@@ -10,7 +10,7 @@ msgstr ""
"Project-Id-Version: libguestfs\n"
"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
"component=libguestfs&product=Virtualization+Tools\n"
-"POT-Creation-Date: 2011-11-01 14:19+0000\n"
+"POT-Creation-Date: 2011-11-03 14:10+0000\n"
"PO-Revision-Date: 2011-10-27 09:11+0000\n"
"Last-Translator: rjones <rjones at redhat.com>\n"
"Language-Team: Hindi <indlinux-hindi at lists.sourceforge.net>\n"
@@ -22,7 +22,7 @@ msgstr ""
#: align/scan.c:68 cat/virt-cat.c:61 cat/virt-filesystems.c:100
#: cat/virt-ls.c:99 df/main.c:70 edit/virt-edit.c:73 fish/fish.c:101
-#: fuse/guestmount.c:908 inspector/virt-inspector.c:72 rescue/virt-rescue.c:62
+#: fuse/guestmount.c:908 inspector/virt-inspector.c:78 rescue/virt-rescue.c:62
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "अधिक सूचना के लिए `%s --help' आजमाएँ.\n"
@@ -50,7 +50,7 @@ msgstr ""
#: align/scan.c:127 cat/virt-cat.c:121 cat/virt-filesystems.c:203
#: cat/virt-ls.c:192 df/domains.c:429 df/main.c:136 edit/virt-edit.c:141
-#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:132
+#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:140
#: rescue/virt-rescue.c:142
#, c-format
msgid "guestfs_create: failed to create handle\n"
@@ -58,7 +58,7 @@ msgstr "guestfs_create: नियंत्रण बनाने में व
#: align/scan.c:145 cat/virt-cat.c:143 cat/virt-filesystems.c:257
#: cat/virt-ls.c:242 df/main.c:160 edit/virt-edit.c:163 fish/fish.c:279
-#: fuse/guestmount.c:1061 inspector/virt-inspector.c:154
+#: fuse/guestmount.c:1061 inspector/virt-inspector.c:164
#: rescue/virt-rescue.c:179
#, c-format
msgid "%s: unknown long option: %s (%d)\n"
@@ -2661,7 +2661,7 @@ msgstr ""
msgid "%s: you must specify a mountpoint in the host filesystem\n"
msgstr "%s: तुम्हें मेजबान फाइल सिस्टम में कोई माउंटप्वाइंट को जरूर निर्दिष्ट करना चाहिए\n"
-#: inspector/virt-inspector.c:76
+#: inspector/virt-inspector.c:82
#, c-format
msgid ""
"%s: display information about a virtual machine\n"
@@ -2680,10 +2680,16 @@ msgid ""
" -v|--verbose Verbose messages\n"
" -V|--version Display version and exit\n"
" -x Trace libguestfs API calls\n"
+" --xpath query Perform an XPath query\n"
"For more information, see the manpage %s(1).\n"
msgstr ""
-#: inspector/virt-inspector.c:263
+#: inspector/virt-inspector.c:255
+#, c-format
+msgid "%s: cannot use --xpath together with other options.\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:288
#, c-format
msgid ""
"%s: no operating system could be detected inside this disk image.\n"
@@ -2700,21 +2706,56 @@ msgid ""
"information about the disk image as possible.\n"
msgstr ""
-#: inspector/virt-inspector.c:288
+#: inspector/virt-inspector.c:313
#, c-format
msgid "%s: XML write error at \"%s\": %m\n"
msgstr ""
-#: inspector/virt-inspector.c:300
+#: inspector/virt-inspector.c:325
#, c-format
msgid "%s: xmlOutputBufferCreateFd: failed to open stdout\n"
msgstr ""
-#: inspector/virt-inspector.c:308
+#: inspector/virt-inspector.c:333
#, c-format
msgid "%s: xmlNewTextWriter: failed to create libxml2 writer\n"
msgstr ""
+#: inspector/virt-inspector.c:827
+#, c-format
+msgid "%s: unable to parse XML from stdin\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:833
+#, c-format
+msgid "%s: unable to create new XPath context\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:840
+#, c-format
+msgid "%s: unable to evaluate XPath expression\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:851
+#, c-format
+msgid "%s: xmlSaveToFd failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:858
+#, c-format
+msgid "%s: xmlNewDoc failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:863
+#, c-format
+msgid "%s: xmlCopyNode failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:870
+#, c-format
+msgid "%s: xmlSaveDoc failed\n"
+msgstr ""
+
#: perl/lib/Sys/Guestfs/Lib.pm:158
msgid "open_guest: first parameter must be a string or an arrayref"
msgstr ""
diff --git a/po/kn.gmo b/po/kn.gmo
index 534e673..2bb90eb 100644
Binary files a/po/kn.gmo and b/po/kn.gmo differ
diff --git a/po/kn.po b/po/kn.po
index 2397219..9f3053c 100644
--- a/po/kn.po
+++ b/po/kn.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: libguestfs\n"
"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
"component=libguestfs&product=Virtualization+Tools\n"
-"POT-Creation-Date: 2011-11-01 14:19+0000\n"
+"POT-Creation-Date: 2011-11-03 14:10+0000\n"
"PO-Revision-Date: 2011-10-27 09:11+0000\n"
"Last-Translator: rjones <rjones at redhat.com>\n"
"Language-Team: Kannada (http://www.transifex.net/projects/p/fedora/team/"
@@ -22,7 +22,7 @@ msgstr ""
#: align/scan.c:68 cat/virt-cat.c:61 cat/virt-filesystems.c:100
#: cat/virt-ls.c:99 df/main.c:70 edit/virt-edit.c:73 fish/fish.c:101
-#: fuse/guestmount.c:908 inspector/virt-inspector.c:72 rescue/virt-rescue.c:62
+#: fuse/guestmount.c:908 inspector/virt-inspector.c:78 rescue/virt-rescue.c:62
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "ಹೆಚ್ಚಿನ ಮಾಹಿತಿಗಾಗಿ `%s -help' ಅನ್ನು ಪ್ರಯತ್ನಿಸಿ .\n"
@@ -50,7 +50,7 @@ msgstr ""
#: align/scan.c:127 cat/virt-cat.c:121 cat/virt-filesystems.c:203
#: cat/virt-ls.c:192 df/domains.c:429 df/main.c:136 edit/virt-edit.c:141
-#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:132
+#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:140
#: rescue/virt-rescue.c:142
#, c-format
msgid "guestfs_create: failed to create handle\n"
@@ -58,7 +58,7 @@ msgstr "guestfs_create: ಹ್ಯಾಂಡಲ್ ಅನ್ನು ನಿರ್ಮ
#: align/scan.c:145 cat/virt-cat.c:143 cat/virt-filesystems.c:257
#: cat/virt-ls.c:242 df/main.c:160 edit/virt-edit.c:163 fish/fish.c:279
-#: fuse/guestmount.c:1061 inspector/virt-inspector.c:154
+#: fuse/guestmount.c:1061 inspector/virt-inspector.c:164
#: rescue/virt-rescue.c:179
#, c-format
msgid "%s: unknown long option: %s (%d)\n"
@@ -2668,7 +2668,7 @@ msgstr ""
msgid "%s: you must specify a mountpoint in the host filesystem\n"
msgstr "%s: ಆತಿಥೇಯ ಕಡತವ್ಯವಸ್ಥೆಯಲ್ಲಿ ಒಂದು ಆರೋಹಣಾ ತಾಣವನ್ನು ನೀವು ಸೂಚಿಸಬೇಕು\n"
-#: inspector/virt-inspector.c:76
+#: inspector/virt-inspector.c:82
#, c-format
msgid ""
"%s: display information about a virtual machine\n"
@@ -2687,10 +2687,16 @@ msgid ""
" -v|--verbose Verbose messages\n"
" -V|--version Display version and exit\n"
" -x Trace libguestfs API calls\n"
+" --xpath query Perform an XPath query\n"
"For more information, see the manpage %s(1).\n"
msgstr ""
-#: inspector/virt-inspector.c:263
+#: inspector/virt-inspector.c:255
+#, c-format
+msgid "%s: cannot use --xpath together with other options.\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:288
#, c-format
msgid ""
"%s: no operating system could be detected inside this disk image.\n"
@@ -2707,21 +2713,56 @@ msgid ""
"information about the disk image as possible.\n"
msgstr ""
-#: inspector/virt-inspector.c:288
+#: inspector/virt-inspector.c:313
#, c-format
msgid "%s: XML write error at \"%s\": %m\n"
msgstr ""
-#: inspector/virt-inspector.c:300
+#: inspector/virt-inspector.c:325
#, c-format
msgid "%s: xmlOutputBufferCreateFd: failed to open stdout\n"
msgstr ""
-#: inspector/virt-inspector.c:308
+#: inspector/virt-inspector.c:333
#, c-format
msgid "%s: xmlNewTextWriter: failed to create libxml2 writer\n"
msgstr ""
+#: inspector/virt-inspector.c:827
+#, c-format
+msgid "%s: unable to parse XML from stdin\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:833
+#, c-format
+msgid "%s: unable to create new XPath context\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:840
+#, c-format
+msgid "%s: unable to evaluate XPath expression\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:851
+#, c-format
+msgid "%s: xmlSaveToFd failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:858
+#, c-format
+msgid "%s: xmlNewDoc failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:863
+#, c-format
+msgid "%s: xmlCopyNode failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:870
+#, c-format
+msgid "%s: xmlSaveDoc failed\n"
+msgstr ""
+
#: perl/lib/Sys/Guestfs/Lib.pm:158
msgid "open_guest: first parameter must be a string or an arrayref"
msgstr ""
diff --git a/po/libguestfs.pot b/po/libguestfs.pot
index 401a109..0bb8ef7 100644
--- a/po/libguestfs.pot
+++ b/po/libguestfs.pot
@@ -6,10 +6,10 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: libguestfs 1.15.1\n"
+"Project-Id-Version: libguestfs 1.15.2\n"
"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
"component=libguestfs&product=Virtualization+Tools\n"
-"POT-Creation-Date: 2011-11-01 14:19+0000\n"
+"POT-Creation-Date: 2011-11-03 14:10+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
@@ -20,7 +20,7 @@ msgstr ""
#: align/scan.c:68 cat/virt-cat.c:61 cat/virt-filesystems.c:100
#: cat/virt-ls.c:99 df/main.c:70 edit/virt-edit.c:73 fish/fish.c:101
-#: fuse/guestmount.c:908 inspector/virt-inspector.c:72 rescue/virt-rescue.c:62
+#: fuse/guestmount.c:908 inspector/virt-inspector.c:78 rescue/virt-rescue.c:62
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr ""
@@ -48,7 +48,7 @@ msgstr ""
#: align/scan.c:127 cat/virt-cat.c:121 cat/virt-filesystems.c:203
#: cat/virt-ls.c:192 df/domains.c:429 df/main.c:136 edit/virt-edit.c:141
-#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:132
+#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:140
#: rescue/virt-rescue.c:142
#, c-format
msgid "guestfs_create: failed to create handle\n"
@@ -56,7 +56,7 @@ msgstr ""
#: align/scan.c:145 cat/virt-cat.c:143 cat/virt-filesystems.c:257
#: cat/virt-ls.c:242 df/main.c:160 edit/virt-edit.c:163 fish/fish.c:279
-#: fuse/guestmount.c:1061 inspector/virt-inspector.c:154
+#: fuse/guestmount.c:1061 inspector/virt-inspector.c:164
#: rescue/virt-rescue.c:179
#, c-format
msgid "%s: unknown long option: %s (%d)\n"
@@ -2651,7 +2651,7 @@ msgstr ""
msgid "%s: you must specify a mountpoint in the host filesystem\n"
msgstr ""
-#: inspector/virt-inspector.c:76
+#: inspector/virt-inspector.c:82
#, c-format
msgid ""
"%s: display information about a virtual machine\n"
@@ -2670,10 +2670,16 @@ msgid ""
" -v|--verbose Verbose messages\n"
" -V|--version Display version and exit\n"
" -x Trace libguestfs API calls\n"
+" --xpath query Perform an XPath query\n"
"For more information, see the manpage %s(1).\n"
msgstr ""
-#: inspector/virt-inspector.c:263
+#: inspector/virt-inspector.c:255
+#, c-format
+msgid "%s: cannot use --xpath together with other options.\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:288
#, c-format
msgid ""
"%s: no operating system could be detected inside this disk image.\n"
@@ -2690,21 +2696,56 @@ msgid ""
"information about the disk image as possible.\n"
msgstr ""
-#: inspector/virt-inspector.c:288
+#: inspector/virt-inspector.c:313
#, c-format
msgid "%s: XML write error at \"%s\": %m\n"
msgstr ""
-#: inspector/virt-inspector.c:300
+#: inspector/virt-inspector.c:325
#, c-format
msgid "%s: xmlOutputBufferCreateFd: failed to open stdout\n"
msgstr ""
-#: inspector/virt-inspector.c:308
+#: inspector/virt-inspector.c:333
#, c-format
msgid "%s: xmlNewTextWriter: failed to create libxml2 writer\n"
msgstr ""
+#: inspector/virt-inspector.c:827
+#, c-format
+msgid "%s: unable to parse XML from stdin\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:833
+#, c-format
+msgid "%s: unable to create new XPath context\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:840
+#, c-format
+msgid "%s: unable to evaluate XPath expression\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:851
+#, c-format
+msgid "%s: xmlSaveToFd failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:858
+#, c-format
+msgid "%s: xmlNewDoc failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:863
+#, c-format
+msgid "%s: xmlCopyNode failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:870
+#, c-format
+msgid "%s: xmlSaveDoc failed\n"
+msgstr ""
+
#: perl/lib/Sys/Guestfs/Lib.pm:158
msgid "open_guest: first parameter must be a string or an arrayref"
msgstr ""
diff --git a/po/ml.gmo b/po/ml.gmo
index 323edba..c71d191 100644
Binary files a/po/ml.gmo and b/po/ml.gmo differ
diff --git a/po/ml.po b/po/ml.po
index 236721f..0679b84 100644
--- a/po/ml.po
+++ b/po/ml.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: libguestfs\n"
"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
"component=libguestfs&product=Virtualization+Tools\n"
-"POT-Creation-Date: 2011-11-01 14:19+0000\n"
+"POT-Creation-Date: 2011-11-03 14:10+0000\n"
"PO-Revision-Date: 2011-10-27 09:11+0000\n"
"Last-Translator: rjones <rjones at redhat.com>\n"
"Language-Team: Malayalam <discuss at lists.smc.org.in>\n"
@@ -21,7 +21,7 @@ msgstr ""
#: align/scan.c:68 cat/virt-cat.c:61 cat/virt-filesystems.c:100
#: cat/virt-ls.c:99 df/main.c:70 edit/virt-edit.c:73 fish/fish.c:101
-#: fuse/guestmount.c:908 inspector/virt-inspector.c:72 rescue/virt-rescue.c:62
+#: fuse/guestmount.c:908 inspector/virt-inspector.c:78 rescue/virt-rescue.c:62
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "കൂടുതല് വിവരങ്ങള്ക്കായി `%s --help' ശ്രമിക്കുക.\n"
@@ -49,7 +49,7 @@ msgstr ""
#: align/scan.c:127 cat/virt-cat.c:121 cat/virt-filesystems.c:203
#: cat/virt-ls.c:192 df/domains.c:429 df/main.c:136 edit/virt-edit.c:141
-#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:132
+#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:140
#: rescue/virt-rescue.c:142
#, c-format
msgid "guestfs_create: failed to create handle\n"
@@ -57,7 +57,7 @@ msgstr "guestfs_create: ഹാന്ഡില് ഉണ്ടാക്ക
#: align/scan.c:145 cat/virt-cat.c:143 cat/virt-filesystems.c:257
#: cat/virt-ls.c:242 df/main.c:160 edit/virt-edit.c:163 fish/fish.c:279
-#: fuse/guestmount.c:1061 inspector/virt-inspector.c:154
+#: fuse/guestmount.c:1061 inspector/virt-inspector.c:164
#: rescue/virt-rescue.c:179
#, c-format
msgid "%s: unknown long option: %s (%d)\n"
@@ -2663,7 +2663,7 @@ msgstr ""
msgid "%s: you must specify a mountpoint in the host filesystem\n"
msgstr "%s: ഹോസ്റ്റ് ഫയല്സിസ്റ്റത്തില് ഒരു മൌണ്ട് പോയിന്റ് നല്കണം\n"
-#: inspector/virt-inspector.c:76
+#: inspector/virt-inspector.c:82
#, c-format
msgid ""
"%s: display information about a virtual machine\n"
@@ -2682,10 +2682,16 @@ msgid ""
" -v|--verbose Verbose messages\n"
" -V|--version Display version and exit\n"
" -x Trace libguestfs API calls\n"
+" --xpath query Perform an XPath query\n"
"For more information, see the manpage %s(1).\n"
msgstr ""
-#: inspector/virt-inspector.c:263
+#: inspector/virt-inspector.c:255
+#, c-format
+msgid "%s: cannot use --xpath together with other options.\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:288
#, c-format
msgid ""
"%s: no operating system could be detected inside this disk image.\n"
@@ -2702,21 +2708,56 @@ msgid ""
"information about the disk image as possible.\n"
msgstr ""
-#: inspector/virt-inspector.c:288
+#: inspector/virt-inspector.c:313
#, c-format
msgid "%s: XML write error at \"%s\": %m\n"
msgstr ""
-#: inspector/virt-inspector.c:300
+#: inspector/virt-inspector.c:325
#, c-format
msgid "%s: xmlOutputBufferCreateFd: failed to open stdout\n"
msgstr ""
-#: inspector/virt-inspector.c:308
+#: inspector/virt-inspector.c:333
#, c-format
msgid "%s: xmlNewTextWriter: failed to create libxml2 writer\n"
msgstr ""
+#: inspector/virt-inspector.c:827
+#, c-format
+msgid "%s: unable to parse XML from stdin\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:833
+#, c-format
+msgid "%s: unable to create new XPath context\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:840
+#, c-format
+msgid "%s: unable to evaluate XPath expression\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:851
+#, c-format
+msgid "%s: xmlSaveToFd failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:858
+#, c-format
+msgid "%s: xmlNewDoc failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:863
+#, c-format
+msgid "%s: xmlCopyNode failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:870
+#, c-format
+msgid "%s: xmlSaveDoc failed\n"
+msgstr ""
+
#: perl/lib/Sys/Guestfs/Lib.pm:158
msgid "open_guest: first parameter must be a string or an arrayref"
msgstr ""
diff --git a/po/mr.gmo b/po/mr.gmo
index 079962c..5acb88f 100644
Binary files a/po/mr.gmo and b/po/mr.gmo differ
diff --git a/po/mr.po b/po/mr.po
index 4a03cf9..d2149f8 100644
--- a/po/mr.po
+++ b/po/mr.po
@@ -10,7 +10,7 @@ msgstr ""
"Project-Id-Version: libguestfs\n"
"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
"component=libguestfs&product=Virtualization+Tools\n"
-"POT-Creation-Date: 2011-11-01 14:19+0000\n"
+"POT-Creation-Date: 2011-11-03 14:10+0000\n"
"PO-Revision-Date: 2011-10-27 09:11+0000\n"
"Last-Translator: rjones <rjones at redhat.com>\n"
"Language-Team: Marathi (http://www.transifex.net/projects/p/fedora/team/"
@@ -23,7 +23,7 @@ msgstr ""
#: align/scan.c:68 cat/virt-cat.c:61 cat/virt-filesystems.c:100
#: cat/virt-ls.c:99 df/main.c:70 edit/virt-edit.c:73 fish/fish.c:101
-#: fuse/guestmount.c:908 inspector/virt-inspector.c:72 rescue/virt-rescue.c:62
+#: fuse/guestmount.c:908 inspector/virt-inspector.c:78 rescue/virt-rescue.c:62
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "अधिक माहितीसाठी `%s --help' वापरून पहा.\n"
@@ -51,7 +51,7 @@ msgstr ""
#: align/scan.c:127 cat/virt-cat.c:121 cat/virt-filesystems.c:203
#: cat/virt-ls.c:192 df/domains.c:429 df/main.c:136 edit/virt-edit.c:141
-#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:132
+#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:140
#: rescue/virt-rescue.c:142
#, c-format
msgid "guestfs_create: failed to create handle\n"
@@ -59,7 +59,7 @@ msgstr "guestfs_create: हँडल निर्माण करण्यास
#: align/scan.c:145 cat/virt-cat.c:143 cat/virt-filesystems.c:257
#: cat/virt-ls.c:242 df/main.c:160 edit/virt-edit.c:163 fish/fish.c:279
-#: fuse/guestmount.c:1061 inspector/virt-inspector.c:154
+#: fuse/guestmount.c:1061 inspector/virt-inspector.c:164
#: rescue/virt-rescue.c:179
#, c-format
msgid "%s: unknown long option: %s (%d)\n"
@@ -2772,8 +2772,8 @@ msgstr ""
msgid "%s: you must specify a mountpoint in the host filesystem\n"
msgstr "%s: यजमान फाइलप्रणालीत तुम्ही माऊंटपॉईंट निर्देशीत करायला हवे\n"
-#: inspector/virt-inspector.c:76
-#, c-format
+#: inspector/virt-inspector.c:82
+#, fuzzy, c-format
msgid ""
"%s: display information about a virtual machine\n"
"Copyright (C) 2010 Red Hat Inc.\n"
@@ -2791,6 +2791,7 @@ msgid ""
" -v|--verbose Verbose messages\n"
" -V|--version Display version and exit\n"
" -x Trace libguestfs API calls\n"
+" --xpath query Perform an XPath query\n"
"For more information, see the manpage %s(1).\n"
msgstr ""
"%s: वर्च्युअल मशीनविषयी माहिती दाखवा\n"
@@ -2812,7 +2813,12 @@ msgstr ""
"\n"
"अधिक माहितीकरीता, manpage %s(1) पहा.\n"
-#: inspector/virt-inspector.c:263
+#: inspector/virt-inspector.c:255
+#, c-format
+msgid "%s: cannot use --xpath together with other options.\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:288
#, c-format
msgid ""
"%s: no operating system could be detected inside this disk image.\n"
@@ -2839,21 +2845,56 @@ msgstr ""
"ही त्रुटी आहे असे आढळल्यास, कृपया बग अहवाल सादर करा ज्यामध्ये \n"
"डिस्क प्रतिमाविषयी जास्तित जास्त माहिती समाविष्टीत असेल.\n"
-#: inspector/virt-inspector.c:288
+#: inspector/virt-inspector.c:313
#, c-format
msgid "%s: XML write error at \"%s\": %m\n"
msgstr "%s: \"%s\" येथे XML लेखन त्रुटी आढळली: %m\n"
-#: inspector/virt-inspector.c:300
+#: inspector/virt-inspector.c:325
#, c-format
msgid "%s: xmlOutputBufferCreateFd: failed to open stdout\n"
msgstr "%s: xmlOutputBufferCreateFd: stdout उघडण्यास अपयशी\n"
-#: inspector/virt-inspector.c:308
+#: inspector/virt-inspector.c:333
#, c-format
msgid "%s: xmlNewTextWriter: failed to create libxml2 writer\n"
msgstr "%s: xmlNewTextWriter: libxml2 राइटर निर्माण करण्यास अपयशी\n"
+#: inspector/virt-inspector.c:827
+#, fuzzy, c-format
+msgid "%s: unable to parse XML from stdin\n"
+msgstr "libvirt द्वारे पुरवलेली XML माहिती वाचण्यास अशक्य"
+
+#: inspector/virt-inspector.c:833
+#, fuzzy, c-format
+msgid "%s: unable to create new XPath context\n"
+msgstr "नवीन XPath संदर्भ निर्माण करणे अशक्य"
+
+#: inspector/virt-inspector.c:840
+#, fuzzy, c-format
+msgid "%s: unable to evaluate XPath expression\n"
+msgstr "XPath वाकप्रचार मुल्यमापन करणे अशक्य"
+
+#: inspector/virt-inspector.c:851
+#, c-format
+msgid "%s: xmlSaveToFd failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:858
+#, c-format
+msgid "%s: xmlNewDoc failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:863
+#, c-format
+msgid "%s: xmlCopyNode failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:870
+#, c-format
+msgid "%s: xmlSaveDoc failed\n"
+msgstr ""
+
#: perl/lib/Sys/Guestfs/Lib.pm:158
msgid "open_guest: first parameter must be a string or an arrayref"
msgstr "open_guest: पहिले घटक string किंवा arrayref असायला हवे"
diff --git a/po/nl.gmo b/po/nl.gmo
index 77b3c2e..d67a4db 100644
Binary files a/po/nl.gmo and b/po/nl.gmo differ
diff --git a/po/nl.po b/po/nl.po
index 0465082..3e1bddd 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -11,7 +11,7 @@ msgstr ""
"Project-Id-Version: libguestfs\n"
"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
"component=libguestfs&product=Virtualization+Tools\n"
-"POT-Creation-Date: 2011-11-01 14:19+0000\n"
+"POT-Creation-Date: 2011-11-03 14:10+0000\n"
"PO-Revision-Date: 2011-10-27 09:11+0000\n"
"Last-Translator: rjones <rjones at redhat.com>\n"
"Language-Team: Dutch (http://www.transifex.net/projects/p/fedora/team/nl/)\n"
@@ -23,7 +23,7 @@ msgstr ""
#: align/scan.c:68 cat/virt-cat.c:61 cat/virt-filesystems.c:100
#: cat/virt-ls.c:99 df/main.c:70 edit/virt-edit.c:73 fish/fish.c:101
-#: fuse/guestmount.c:908 inspector/virt-inspector.c:72 rescue/virt-rescue.c:62
+#: fuse/guestmount.c:908 inspector/virt-inspector.c:78 rescue/virt-rescue.c:62
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Probeer `%s --help' voor meer informatie\n"
@@ -67,7 +67,7 @@ msgstr ""
#: align/scan.c:127 cat/virt-cat.c:121 cat/virt-filesystems.c:203
#: cat/virt-ls.c:192 df/domains.c:429 df/main.c:136 edit/virt-edit.c:141
-#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:132
+#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:140
#: rescue/virt-rescue.c:142
#, c-format
msgid "guestfs_create: failed to create handle\n"
@@ -75,7 +75,7 @@ msgstr "guestfs_create: hendel aanmaken mislukte\n"
#: align/scan.c:145 cat/virt-cat.c:143 cat/virt-filesystems.c:257
#: cat/virt-ls.c:242 df/main.c:160 edit/virt-edit.c:163 fish/fish.c:279
-#: fuse/guestmount.c:1061 inspector/virt-inspector.c:154
+#: fuse/guestmount.c:1061 inspector/virt-inspector.c:164
#: rescue/virt-rescue.c:179
#, c-format
msgid "%s: unknown long option: %s (%d)\n"
@@ -2949,8 +2949,8 @@ msgid "%s: you must specify a mountpoint in the host filesystem\n"
msgstr ""
"%s: je moet een aankoppel punt in het host bestandssysteem specificeren\n"
-#: inspector/virt-inspector.c:76
-#, c-format
+#: inspector/virt-inspector.c:82
+#, fuzzy, c-format
msgid ""
"%s: display information about a virtual machine\n"
"Copyright (C) 2010 Red Hat Inc.\n"
@@ -2968,6 +2968,7 @@ msgid ""
" -v|--verbose Verbose messages\n"
" -V|--version Display version and exit\n"
" -x Trace libguestfs API calls\n"
+" --xpath query Perform an XPath query\n"
"For more information, see the manpage %s(1).\n"
msgstr ""
"%s: toon informatie over een virtuele machine\n"
@@ -2988,7 +2989,12 @@ msgstr ""
" -x Traceer libguestfs API aanroepen\n"
"Voor meer informatie, zie de man pagina %s(1).\n"
-#: inspector/virt-inspector.c:263
+#: inspector/virt-inspector.c:255
+#, c-format
+msgid "%s: cannot use --xpath together with other options.\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:288
#, c-format
msgid ""
"%s: no operating system could be detected inside this disk image.\n"
@@ -3018,21 +3024,56 @@ msgstr ""
"Als je vindt dat dit een fout is, dien dan een bug rapport in met\n"
"zo veel mogelijk informatie over de schijf image.\n"
-#: inspector/virt-inspector.c:288
+#: inspector/virt-inspector.c:313
#, c-format
msgid "%s: XML write error at \"%s\": %m\n"
msgstr "%s: XML schrijf fout bij \"%s\": %m\n"
-#: inspector/virt-inspector.c:300
+#: inspector/virt-inspector.c:325
#, c-format
msgid "%s: xmlOutputBufferCreateFd: failed to open stdout\n"
msgstr "%s: xmlOutputBufferCreateFd: stdout openen mislukte\n"
-#: inspector/virt-inspector.c:308
+#: inspector/virt-inspector.c:333
#, c-format
msgid "%s: xmlNewTextWriter: failed to create libxml2 writer\n"
msgstr "%s: xmlNewTextWriter: libxml2 schrijver aanmaken mislukte\n"
+#: inspector/virt-inspector.c:827
+#, fuzzy, c-format
+msgid "%s: unable to parse XML from stdin\n"
+msgstr "kan XML informatie teruggegeven door libvirt niet ontleden"
+
+#: inspector/virt-inspector.c:833
+#, fuzzy, c-format
+msgid "%s: unable to create new XPath context\n"
+msgstr "kan nieuwe XPath context niet aanmaken"
+
+#: inspector/virt-inspector.c:840
+#, fuzzy, c-format
+msgid "%s: unable to evaluate XPath expression\n"
+msgstr "kan XPath expressie niet evalueren"
+
+#: inspector/virt-inspector.c:851
+#, c-format
+msgid "%s: xmlSaveToFd failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:858
+#, c-format
+msgid "%s: xmlNewDoc failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:863
+#, c-format
+msgid "%s: xmlCopyNode failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:870
+#, c-format
+msgid "%s: xmlSaveDoc failed\n"
+msgstr ""
+
#: perl/lib/Sys/Guestfs/Lib.pm:158
msgid "open_guest: first parameter must be a string or an arrayref"
msgstr "open_guest: eerste parameter moet een tekenreeks of een arrayref zijn"
diff --git a/po/or.gmo b/po/or.gmo
index c0e5f8a..0f15442 100644
Binary files a/po/or.gmo and b/po/or.gmo differ
diff --git a/po/or.po b/po/or.po
index 9223dfe..7f23c3e 100644
--- a/po/or.po
+++ b/po/or.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: libguestfs\n"
"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
"component=libguestfs&product=Virtualization+Tools\n"
-"POT-Creation-Date: 2011-11-01 14:19+0000\n"
+"POT-Creation-Date: 2011-11-03 14:10+0000\n"
"PO-Revision-Date: 2011-10-27 09:11+0000\n"
"Last-Translator: rjones <rjones at redhat.com>\n"
"Language-Team: Oriya (http://www.transifex.net/projects/p/fedora/team/or/)\n"
@@ -21,7 +21,7 @@ msgstr ""
#: align/scan.c:68 cat/virt-cat.c:61 cat/virt-filesystems.c:100
#: cat/virt-ls.c:99 df/main.c:70 edit/virt-edit.c:73 fish/fish.c:101
-#: fuse/guestmount.c:908 inspector/virt-inspector.c:72 rescue/virt-rescue.c:62
+#: fuse/guestmount.c:908 inspector/virt-inspector.c:78 rescue/virt-rescue.c:62
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "ଅଧିକ ସୂଚନା ପାଇଁ `%s --help' କୁ ଚେଷ୍ଟା କରନ୍ତୁ।\n"
@@ -49,7 +49,7 @@ msgstr ""
#: align/scan.c:127 cat/virt-cat.c:121 cat/virt-filesystems.c:203
#: cat/virt-ls.c:192 df/domains.c:429 df/main.c:136 edit/virt-edit.c:141
-#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:132
+#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:140
#: rescue/virt-rescue.c:142
#, c-format
msgid "guestfs_create: failed to create handle\n"
@@ -57,7 +57,7 @@ msgstr "guestfs_create: ନିୟନ୍ତ୍ରଣ ପ୍ରସ୍ତୁତ କ
#: align/scan.c:145 cat/virt-cat.c:143 cat/virt-filesystems.c:257
#: cat/virt-ls.c:242 df/main.c:160 edit/virt-edit.c:163 fish/fish.c:279
-#: fuse/guestmount.c:1061 inspector/virt-inspector.c:154
+#: fuse/guestmount.c:1061 inspector/virt-inspector.c:164
#: rescue/virt-rescue.c:179
#, c-format
msgid "%s: unknown long option: %s (%d)\n"
@@ -2661,7 +2661,7 @@ msgstr ""
msgid "%s: you must specify a mountpoint in the host filesystem\n"
msgstr "%s: ଆପଣଙ୍କୁ ହୋଷ୍ଟ ଫାଇଲତନ୍ତ୍ରରେ ଗୋଟିଏ ସ୍ଥାପନ ବିନ୍ଦୁ ଉଲ୍ଲେଖ କରିବାକୁ ହେବ\n"
-#: inspector/virt-inspector.c:76
+#: inspector/virt-inspector.c:82
#, c-format
msgid ""
"%s: display information about a virtual machine\n"
@@ -2680,10 +2680,16 @@ msgid ""
" -v|--verbose Verbose messages\n"
" -V|--version Display version and exit\n"
" -x Trace libguestfs API calls\n"
+" --xpath query Perform an XPath query\n"
"For more information, see the manpage %s(1).\n"
msgstr ""
-#: inspector/virt-inspector.c:263
+#: inspector/virt-inspector.c:255
+#, c-format
+msgid "%s: cannot use --xpath together with other options.\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:288
#, c-format
msgid ""
"%s: no operating system could be detected inside this disk image.\n"
@@ -2700,21 +2706,56 @@ msgid ""
"information about the disk image as possible.\n"
msgstr ""
-#: inspector/virt-inspector.c:288
+#: inspector/virt-inspector.c:313
#, c-format
msgid "%s: XML write error at \"%s\": %m\n"
msgstr ""
-#: inspector/virt-inspector.c:300
+#: inspector/virt-inspector.c:325
#, c-format
msgid "%s: xmlOutputBufferCreateFd: failed to open stdout\n"
msgstr ""
-#: inspector/virt-inspector.c:308
+#: inspector/virt-inspector.c:333
#, c-format
msgid "%s: xmlNewTextWriter: failed to create libxml2 writer\n"
msgstr ""
+#: inspector/virt-inspector.c:827
+#, c-format
+msgid "%s: unable to parse XML from stdin\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:833
+#, c-format
+msgid "%s: unable to create new XPath context\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:840
+#, c-format
+msgid "%s: unable to evaluate XPath expression\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:851
+#, c-format
+msgid "%s: xmlSaveToFd failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:858
+#, c-format
+msgid "%s: xmlNewDoc failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:863
+#, c-format
+msgid "%s: xmlCopyNode failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:870
+#, c-format
+msgid "%s: xmlSaveDoc failed\n"
+msgstr ""
+
#: perl/lib/Sys/Guestfs/Lib.pm:158
msgid "open_guest: first parameter must be a string or an arrayref"
msgstr ""
diff --git a/po/pa.gmo b/po/pa.gmo
index e758aac..9c310a1 100644
Binary files a/po/pa.gmo and b/po/pa.gmo differ
diff --git a/po/pa.po b/po/pa.po
index 54773f9..f824234 100644
--- a/po/pa.po
+++ b/po/pa.po
@@ -10,7 +10,7 @@ msgstr ""
"Project-Id-Version: libguestfs\n"
"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
"component=libguestfs&product=Virtualization+Tools\n"
-"POT-Creation-Date: 2011-11-01 14:19+0000\n"
+"POT-Creation-Date: 2011-11-03 14:10+0000\n"
"PO-Revision-Date: 2011-10-27 09:11+0000\n"
"Last-Translator: rjones <rjones at redhat.com>\n"
"Language-Team: Panjabi (Punjabi) <punjabi-users at lists.sf.net>\n"
@@ -22,7 +22,7 @@ msgstr ""
#: align/scan.c:68 cat/virt-cat.c:61 cat/virt-filesystems.c:100
#: cat/virt-ls.c:99 df/main.c:70 edit/virt-edit.c:73 fish/fish.c:101
-#: fuse/guestmount.c:908 inspector/virt-inspector.c:72 rescue/virt-rescue.c:62
+#: fuse/guestmount.c:908 inspector/virt-inspector.c:78 rescue/virt-rescue.c:62
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "ਵਧੇਰੇ ਜਾਣਕਾਰੀ ਲਈ `%s --help' ਵਰਤੋ।\n"
@@ -50,7 +50,7 @@ msgstr ""
#: align/scan.c:127 cat/virt-cat.c:121 cat/virt-filesystems.c:203
#: cat/virt-ls.c:192 df/domains.c:429 df/main.c:136 edit/virt-edit.c:141
-#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:132
+#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:140
#: rescue/virt-rescue.c:142
#, c-format
msgid "guestfs_create: failed to create handle\n"
@@ -58,7 +58,7 @@ msgstr "guestfs_create: ਹੈਂਡਲ ਬਣਾਉਣ ਵਿੱਚ ਫੇਲ\n
#: align/scan.c:145 cat/virt-cat.c:143 cat/virt-filesystems.c:257
#: cat/virt-ls.c:242 df/main.c:160 edit/virt-edit.c:163 fish/fish.c:279
-#: fuse/guestmount.c:1061 inspector/virt-inspector.c:154
+#: fuse/guestmount.c:1061 inspector/virt-inspector.c:164
#: rescue/virt-rescue.c:179
#, c-format
msgid "%s: unknown long option: %s (%d)\n"
@@ -2767,8 +2767,8 @@ msgstr ""
msgid "%s: you must specify a mountpoint in the host filesystem\n"
msgstr "%s: ਤੁਹਾਨੂੰ ਹੋਸਟ ਫਾਇਲ-ਸਿਸਟਮ ਵਿੱਚ ਮਾਊਂਟਪੁਆਂਇਟ ਦੇਣਾ ਚਾਹੀਦਾ ਹੈ\n"
-#: inspector/virt-inspector.c:76
-#, c-format
+#: inspector/virt-inspector.c:82
+#, fuzzy, c-format
msgid ""
"%s: display information about a virtual machine\n"
"Copyright (C) 2010 Red Hat Inc.\n"
@@ -2786,6 +2786,7 @@ msgid ""
" -v|--verbose Verbose messages\n"
" -V|--version Display version and exit\n"
" -x Trace libguestfs API calls\n"
+" --xpath query Perform an XPath query\n"
"For more information, see the manpage %s(1).\n"
msgstr ""
"%s: display information about a virtual machine\n"
@@ -2806,7 +2807,12 @@ msgstr ""
" -x Trace libguestfs API calls\n"
"For more information, see the manpage %s(1)।\n"
-#: inspector/virt-inspector.c:263
+#: inspector/virt-inspector.c:255
+#, c-format
+msgid "%s: cannot use --xpath together with other options.\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:288
#, c-format
msgid ""
"%s: no operating system could be detected inside this disk image.\n"
@@ -2835,21 +2841,56 @@ msgstr ""
"If you feel this is an error, please file a bug report including as much\n"
"information about the disk image as possible.\n"
-#: inspector/virt-inspector.c:288
+#: inspector/virt-inspector.c:313
#, c-format
msgid "%s: XML write error at \"%s\": %m\n"
msgstr "%s: XML ਲਿਖਣ ਗਲਤੀ \"%s\" ਉੱਪਰ: %m\n"
-#: inspector/virt-inspector.c:300
+#: inspector/virt-inspector.c:325
#, c-format
msgid "%s: xmlOutputBufferCreateFd: failed to open stdout\n"
msgstr "%s: xmlOutputBufferCreateFd: stdout ਨੂੰ ਖੋਲਣ ਤੋਂ ਫੇਲ ਹੋਇਆ\n"
-#: inspector/virt-inspector.c:308
+#: inspector/virt-inspector.c:333
#, c-format
msgid "%s: xmlNewTextWriter: failed to create libxml2 writer\n"
msgstr "%s: xmlNewTextWriter: libxml2 ਰਾਈਟਰ ਬਣਾਉਣ ਵਿੱਚ ਫੇਲ\n"
+#: inspector/virt-inspector.c:827
+#, fuzzy, c-format
+msgid "%s: unable to parse XML from stdin\n"
+msgstr "libvirt ਦੁਆਰਾ ਦਿੱਤੀ XML ਜਾਣਕਾਰੀ ਨੂੰ ਪਾਰਸ ਕਰਨ ਵਿੱਚ ਅਸਫਲ"
+
+#: inspector/virt-inspector.c:833
+#, fuzzy, c-format
+msgid "%s: unable to create new XPath context\n"
+msgstr "ਨਵਾਂ XPath ਪ੍ਰਸੰਗ ਬਣਾਉਣ ਵਿੱਚ ਅਸਫਲ"
+
+#: inspector/virt-inspector.c:840
+#, fuzzy, c-format
+msgid "%s: unable to evaluate XPath expression\n"
+msgstr "XPath ਐਕਸਪ੍ਰੈਸ਼ਨ ਦਾ ਮੁੱਲ ਪਤਾ ਕਰਨ ਵਿੱਚ ਅਸਫਲ"
+
+#: inspector/virt-inspector.c:851
+#, c-format
+msgid "%s: xmlSaveToFd failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:858
+#, c-format
+msgid "%s: xmlNewDoc failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:863
+#, c-format
+msgid "%s: xmlCopyNode failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:870
+#, c-format
+msgid "%s: xmlSaveDoc failed\n"
+msgstr ""
+
#: perl/lib/Sys/Guestfs/Lib.pm:158
msgid "open_guest: first parameter must be a string or an arrayref"
msgstr "open_guest: ਪਹਿਲਾ ਪੈਰਾਮੀਟਰ ਸਤਰ ਜਾਂ ਇੱਕ arrayref ਹੋਣਾ ਜਰੂਰੀ ਹੈ।"
diff --git a/po/pl.gmo b/po/pl.gmo
index 29acb06..c2fd88d 100644
Binary files a/po/pl.gmo and b/po/pl.gmo differ
diff --git a/po/pl.po b/po/pl.po
index 4a75c54..ee6b419 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -10,7 +10,7 @@ msgstr ""
"Project-Id-Version: libguestfs\n"
"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
"component=libguestfs&product=Virtualization+Tools\n"
-"POT-Creation-Date: 2011-11-01 14:19+0000\n"
+"POT-Creation-Date: 2011-11-03 14:10+0000\n"
"PO-Revision-Date: 2011-10-27 09:11+0000\n"
"Last-Translator: rjones <rjones at redhat.com>\n"
"Language-Team: Polish (http://www.transifex.net/projects/p/fedora/team/pl/)\n"
@@ -23,7 +23,7 @@ msgstr ""
#: align/scan.c:68 cat/virt-cat.c:61 cat/virt-filesystems.c:100
#: cat/virt-ls.c:99 df/main.c:70 edit/virt-edit.c:73 fish/fish.c:101
-#: fuse/guestmount.c:908 inspector/virt-inspector.c:72 rescue/virt-rescue.c:62
+#: fuse/guestmount.c:908 inspector/virt-inspector.c:78 rescue/virt-rescue.c:62
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Należy spróbować \"%s --help\", aby uzyskać więcej informacji.\n"
@@ -67,7 +67,7 @@ msgstr ""
#: align/scan.c:127 cat/virt-cat.c:121 cat/virt-filesystems.c:203
#: cat/virt-ls.c:192 df/domains.c:429 df/main.c:136 edit/virt-edit.c:141
-#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:132
+#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:140
#: rescue/virt-rescue.c:142
#, c-format
msgid "guestfs_create: failed to create handle\n"
@@ -75,7 +75,7 @@ msgstr "guestfs_create: utworzenie programu obsługi nie powiodło się\n"
#: align/scan.c:145 cat/virt-cat.c:143 cat/virt-filesystems.c:257
#: cat/virt-ls.c:242 df/main.c:160 edit/virt-edit.c:163 fish/fish.c:279
-#: fuse/guestmount.c:1061 inspector/virt-inspector.c:154
+#: fuse/guestmount.c:1061 inspector/virt-inspector.c:164
#: rescue/virt-rescue.c:179
#, c-format
msgid "%s: unknown long option: %s (%d)\n"
@@ -2967,8 +2967,8 @@ msgstr ""
msgid "%s: you must specify a mountpoint in the host filesystem\n"
msgstr "%s: należy podać punkt montowania w systemie plików gospodarza\n"
-#: inspector/virt-inspector.c:76
-#, c-format
+#: inspector/virt-inspector.c:82
+#, fuzzy, c-format
msgid ""
"%s: display information about a virtual machine\n"
"Copyright (C) 2010 Red Hat Inc.\n"
@@ -2986,6 +2986,7 @@ msgid ""
" -v|--verbose Verbose messages\n"
" -V|--version Display version and exit\n"
" -x Trace libguestfs API calls\n"
+" --xpath query Perform an XPath query\n"
"For more information, see the manpage %s(1).\n"
msgstr ""
"%s: wyświetla informacje o maszynie wirtualnej\n"
@@ -3006,7 +3007,12 @@ msgstr ""
" -x Śledzi wywołania API biblioteki libguestfs\n"
"Aby dowiedzieć się więcej, należy zobaczyć stronę podręcznika %s(1).\n"
-#: inspector/virt-inspector.c:263
+#: inspector/virt-inspector.c:255
+#, c-format
+msgid "%s: cannot use --xpath together with other options.\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:288
#, c-format
msgid ""
"%s: no operating system could be detected inside this disk image.\n"
@@ -3034,25 +3040,61 @@ msgstr ""
"Jeśli jest to błąd, proszę wypełnić zgłoszenie błędu dołączając tak dużo "
"informacji o pliku obrazu, jak to tylko możliwe (w języku angielskim).\n"
-#: inspector/virt-inspector.c:288
+#: inspector/virt-inspector.c:313
#, c-format
msgid "%s: XML write error at \"%s\": %m\n"
msgstr "%s: błąd zapisu XML w \"%s\": %m\n"
-#: inspector/virt-inspector.c:300
+#: inspector/virt-inspector.c:325
#, c-format
msgid "%s: xmlOutputBufferCreateFd: failed to open stdout\n"
msgstr ""
"%s: xmlOutputBufferCreateFd: otwarcie standardowego wyjścia nie powiodło "
"się\n"
-#: inspector/virt-inspector.c:308
+#: inspector/virt-inspector.c:333
#, c-format
msgid "%s: xmlNewTextWriter: failed to create libxml2 writer\n"
msgstr ""
"%s: xmlNewTextWriter: utworzenie modułu zapisującego libxml2 nie powiodło "
"się\n"
+#: inspector/virt-inspector.c:827
+#, fuzzy, c-format
+msgid "%s: unable to parse XML from stdin\n"
+msgstr ""
+"nie można przetworzyć informacji XML zwróconej przez bibliotekę libvirt"
+
+#: inspector/virt-inspector.c:833
+#, fuzzy, c-format
+msgid "%s: unable to create new XPath context\n"
+msgstr "nie można utworzyć nowego kontekstu XPath"
+
+#: inspector/virt-inspector.c:840
+#, fuzzy, c-format
+msgid "%s: unable to evaluate XPath expression\n"
+msgstr "nie można sprawdzić wyrażenia XPath"
+
+#: inspector/virt-inspector.c:851
+#, c-format
+msgid "%s: xmlSaveToFd failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:858
+#, c-format
+msgid "%s: xmlNewDoc failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:863
+#, c-format
+msgid "%s: xmlCopyNode failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:870
+#, c-format
+msgid "%s: xmlSaveDoc failed\n"
+msgstr ""
+
#: perl/lib/Sys/Guestfs/Lib.pm:158
msgid "open_guest: first parameter must be a string or an arrayref"
msgstr "open_guest: pierwszy parametr musi być ciągiem lub \"arrayref\""
diff --git a/po/ta.gmo b/po/ta.gmo
index 680ad1e..068a292 100644
Binary files a/po/ta.gmo and b/po/ta.gmo differ
diff --git a/po/ta.po b/po/ta.po
index d4693dd..c47da42 100644
--- a/po/ta.po
+++ b/po/ta.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: libguestfs\n"
"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
"component=libguestfs&product=Virtualization+Tools\n"
-"POT-Creation-Date: 2011-11-01 14:19+0000\n"
+"POT-Creation-Date: 2011-11-03 14:10+0000\n"
"PO-Revision-Date: 2011-10-27 09:11+0000\n"
"Last-Translator: rjones <rjones at redhat.com>\n"
"Language-Team: Tamil <tamil-users at lists.fedoraproject.org>\n"
@@ -21,7 +21,7 @@ msgstr ""
#: align/scan.c:68 cat/virt-cat.c:61 cat/virt-filesystems.c:100
#: cat/virt-ls.c:99 df/main.c:70 edit/virt-edit.c:73 fish/fish.c:101
-#: fuse/guestmount.c:908 inspector/virt-inspector.c:72 rescue/virt-rescue.c:62
+#: fuse/guestmount.c:908 inspector/virt-inspector.c:78 rescue/virt-rescue.c:62
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "`%s --help' க்கான கூடுதல் தகவலுக்கு முயற்சிக்கவும்.\n"
@@ -49,7 +49,7 @@ msgstr ""
#: align/scan.c:127 cat/virt-cat.c:121 cat/virt-filesystems.c:203
#: cat/virt-ls.c:192 df/domains.c:429 df/main.c:136 edit/virt-edit.c:141
-#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:132
+#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:140
#: rescue/virt-rescue.c:142
#, c-format
msgid "guestfs_create: failed to create handle\n"
@@ -57,7 +57,7 @@ msgstr "guestfs_create: ஹாண்டிலை உருவாக்க மு
#: align/scan.c:145 cat/virt-cat.c:143 cat/virt-filesystems.c:257
#: cat/virt-ls.c:242 df/main.c:160 edit/virt-edit.c:163 fish/fish.c:279
-#: fuse/guestmount.c:1061 inspector/virt-inspector.c:154
+#: fuse/guestmount.c:1061 inspector/virt-inspector.c:164
#: rescue/virt-rescue.c:179
#, c-format
msgid "%s: unknown long option: %s (%d)\n"
@@ -2662,7 +2662,7 @@ msgstr ""
msgid "%s: you must specify a mountpoint in the host filesystem\n"
msgstr "%s: புரவல கோப்புமுறைமையில் ஒரு ஏறும்புள்ளியை நீங்கள் குறிப்பிட வேண்டும்\n"
-#: inspector/virt-inspector.c:76
+#: inspector/virt-inspector.c:82
#, c-format
msgid ""
"%s: display information about a virtual machine\n"
@@ -2681,10 +2681,16 @@ msgid ""
" -v|--verbose Verbose messages\n"
" -V|--version Display version and exit\n"
" -x Trace libguestfs API calls\n"
+" --xpath query Perform an XPath query\n"
"For more information, see the manpage %s(1).\n"
msgstr ""
-#: inspector/virt-inspector.c:263
+#: inspector/virt-inspector.c:255
+#, c-format
+msgid "%s: cannot use --xpath together with other options.\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:288
#, c-format
msgid ""
"%s: no operating system could be detected inside this disk image.\n"
@@ -2701,21 +2707,56 @@ msgid ""
"information about the disk image as possible.\n"
msgstr ""
-#: inspector/virt-inspector.c:288
+#: inspector/virt-inspector.c:313
#, c-format
msgid "%s: XML write error at \"%s\": %m\n"
msgstr ""
-#: inspector/virt-inspector.c:300
+#: inspector/virt-inspector.c:325
#, c-format
msgid "%s: xmlOutputBufferCreateFd: failed to open stdout\n"
msgstr ""
-#: inspector/virt-inspector.c:308
+#: inspector/virt-inspector.c:333
#, c-format
msgid "%s: xmlNewTextWriter: failed to create libxml2 writer\n"
msgstr ""
+#: inspector/virt-inspector.c:827
+#, c-format
+msgid "%s: unable to parse XML from stdin\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:833
+#, c-format
+msgid "%s: unable to create new XPath context\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:840
+#, c-format
+msgid "%s: unable to evaluate XPath expression\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:851
+#, c-format
+msgid "%s: xmlSaveToFd failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:858
+#, c-format
+msgid "%s: xmlNewDoc failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:863
+#, c-format
+msgid "%s: xmlCopyNode failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:870
+#, c-format
+msgid "%s: xmlSaveDoc failed\n"
+msgstr ""
+
#: perl/lib/Sys/Guestfs/Lib.pm:158
msgid "open_guest: first parameter must be a string or an arrayref"
msgstr ""
diff --git a/po/te.gmo b/po/te.gmo
index dbd4a89..17ebc13 100644
Binary files a/po/te.gmo and b/po/te.gmo differ
diff --git a/po/te.po b/po/te.po
index 20e23a1..4e140be 100644
--- a/po/te.po
+++ b/po/te.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: libguestfs\n"
"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
"component=libguestfs&product=Virtualization+Tools\n"
-"POT-Creation-Date: 2011-11-01 14:19+0000\n"
+"POT-Creation-Date: 2011-11-03 14:10+0000\n"
"PO-Revision-Date: 2011-10-27 09:11+0000\n"
"Last-Translator: rjones <rjones at redhat.com>\n"
"Language-Team: Telugu (http://www.transifex.net/projects/p/fedora/team/te/)\n"
@@ -21,7 +21,7 @@ msgstr ""
#: align/scan.c:68 cat/virt-cat.c:61 cat/virt-filesystems.c:100
#: cat/virt-ls.c:99 df/main.c:70 edit/virt-edit.c:73 fish/fish.c:101
-#: fuse/guestmount.c:908 inspector/virt-inspector.c:72 rescue/virt-rescue.c:62
+#: fuse/guestmount.c:908 inspector/virt-inspector.c:78 rescue/virt-rescue.c:62
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "అధిక సమాచారము కొరకు `%s --help' ప్రయత్నించండి\n"
@@ -49,7 +49,7 @@ msgstr ""
#: align/scan.c:127 cat/virt-cat.c:121 cat/virt-filesystems.c:203
#: cat/virt-ls.c:192 df/domains.c:429 df/main.c:136 edit/virt-edit.c:141
-#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:132
+#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:140
#: rescue/virt-rescue.c:142
#, c-format
msgid "guestfs_create: failed to create handle\n"
@@ -57,7 +57,7 @@ msgstr "guestfs_create: సంభాలికను సృష్టించు
#: align/scan.c:145 cat/virt-cat.c:143 cat/virt-filesystems.c:257
#: cat/virt-ls.c:242 df/main.c:160 edit/virt-edit.c:163 fish/fish.c:279
-#: fuse/guestmount.c:1061 inspector/virt-inspector.c:154
+#: fuse/guestmount.c:1061 inspector/virt-inspector.c:164
#: rescue/virt-rescue.c:179
#, c-format
msgid "%s: unknown long option: %s (%d)\n"
@@ -2659,7 +2659,7 @@ msgstr ""
msgid "%s: you must specify a mountpoint in the host filesystem\n"
msgstr "%s:హోస్టు ఫైల్సిస్టమ్ నందు మీరు తప్పక వొక మౌంట్పాయింట్ను తెలుపవలెను\n"
-#: inspector/virt-inspector.c:76
+#: inspector/virt-inspector.c:82
#, c-format
msgid ""
"%s: display information about a virtual machine\n"
@@ -2678,10 +2678,16 @@ msgid ""
" -v|--verbose Verbose messages\n"
" -V|--version Display version and exit\n"
" -x Trace libguestfs API calls\n"
+" --xpath query Perform an XPath query\n"
"For more information, see the manpage %s(1).\n"
msgstr ""
-#: inspector/virt-inspector.c:263
+#: inspector/virt-inspector.c:255
+#, c-format
+msgid "%s: cannot use --xpath together with other options.\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:288
#, c-format
msgid ""
"%s: no operating system could be detected inside this disk image.\n"
@@ -2698,21 +2704,56 @@ msgid ""
"information about the disk image as possible.\n"
msgstr ""
-#: inspector/virt-inspector.c:288
+#: inspector/virt-inspector.c:313
#, c-format
msgid "%s: XML write error at \"%s\": %m\n"
msgstr ""
-#: inspector/virt-inspector.c:300
+#: inspector/virt-inspector.c:325
#, c-format
msgid "%s: xmlOutputBufferCreateFd: failed to open stdout\n"
msgstr ""
-#: inspector/virt-inspector.c:308
+#: inspector/virt-inspector.c:333
#, c-format
msgid "%s: xmlNewTextWriter: failed to create libxml2 writer\n"
msgstr ""
+#: inspector/virt-inspector.c:827
+#, c-format
+msgid "%s: unable to parse XML from stdin\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:833
+#, c-format
+msgid "%s: unable to create new XPath context\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:840
+#, c-format
+msgid "%s: unable to evaluate XPath expression\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:851
+#, c-format
+msgid "%s: xmlSaveToFd failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:858
+#, c-format
+msgid "%s: xmlNewDoc failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:863
+#, c-format
+msgid "%s: xmlCopyNode failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:870
+#, c-format
+msgid "%s: xmlSaveDoc failed\n"
+msgstr ""
+
#: perl/lib/Sys/Guestfs/Lib.pm:158
msgid "open_guest: first parameter must be a string or an arrayref"
msgstr ""
diff --git a/po/uk.gmo b/po/uk.gmo
index 5081bc4..a7d96e6 100644
Binary files a/po/uk.gmo and b/po/uk.gmo differ
diff --git a/po/uk.po b/po/uk.po
index 514f0aa..534c9b8 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: libguestfs\n"
"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
"component=libguestfs&product=Virtualization+Tools\n"
-"POT-Creation-Date: 2011-11-01 14:19+0000\n"
+"POT-Creation-Date: 2011-11-03 14:10+0000\n"
"PO-Revision-Date: 2011-10-27 09:11+0000\n"
"Last-Translator: rjones <rjones at redhat.com>\n"
"Language-Team: Ukrainian <trans-uk at lists.fedoraproject.org>\n"
@@ -22,7 +22,7 @@ msgstr ""
#: align/scan.c:68 cat/virt-cat.c:61 cat/virt-filesystems.c:100
#: cat/virt-ls.c:99 df/main.c:70 edit/virt-edit.c:73 fish/fish.c:101
-#: fuse/guestmount.c:908 inspector/virt-inspector.c:72 rescue/virt-rescue.c:62
+#: fuse/guestmount.c:908 inspector/virt-inspector.c:78 rescue/virt-rescue.c:62
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Щоб дізнатися більше, віддайте команду «%s --help».\n"
@@ -66,7 +66,7 @@ msgstr ""
#: align/scan.c:127 cat/virt-cat.c:121 cat/virt-filesystems.c:203
#: cat/virt-ls.c:192 df/domains.c:429 df/main.c:136 edit/virt-edit.c:141
-#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:132
+#: fish/fish.c:222 fuse/guestmount.c:1024 inspector/virt-inspector.c:140
#: rescue/virt-rescue.c:142
#, c-format
msgid "guestfs_create: failed to create handle\n"
@@ -74,7 +74,7 @@ msgstr "guestfs_create: не вдалося створити елемент ке
#: align/scan.c:145 cat/virt-cat.c:143 cat/virt-filesystems.c:257
#: cat/virt-ls.c:242 df/main.c:160 edit/virt-edit.c:163 fish/fish.c:279
-#: fuse/guestmount.c:1061 inspector/virt-inspector.c:154
+#: fuse/guestmount.c:1061 inspector/virt-inspector.c:164
#: rescue/virt-rescue.c:179
#, c-format
msgid "%s: unknown long option: %s (%d)\n"
@@ -3008,8 +3008,8 @@ msgstr ""
msgid "%s: you must specify a mountpoint in the host filesystem\n"
msgstr "%s: вам слід вказати точку монтування у основній файловій системі\n"
-#: inspector/virt-inspector.c:76
-#, c-format
+#: inspector/virt-inspector.c:82
+#, fuzzy, c-format
msgid ""
"%s: display information about a virtual machine\n"
"Copyright (C) 2010 Red Hat Inc.\n"
@@ -3027,6 +3027,7 @@ msgid ""
" -v|--verbose Verbose messages\n"
" -V|--version Display version and exit\n"
" -x Trace libguestfs API calls\n"
+" --xpath query Perform an XPath query\n"
"For more information, see the manpage %s(1).\n"
msgstr ""
"%s: показ інформації щодо віртуальної машини\n"
@@ -3047,7 +3048,12 @@ msgstr ""
" -x Трасувати виклики програмного інтерфейсу libguestfs\n"
"Щоб дізнатися більше, скористайтеся сторінкою довідника (man) %s(1).\n"
-#: inspector/virt-inspector.c:263
+#: inspector/virt-inspector.c:255
+#, c-format
+msgid "%s: cannot use --xpath together with other options.\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:288
#, c-format
msgid ""
"%s: no operating system could be detected inside this disk image.\n"
@@ -3077,21 +3083,56 @@ msgstr ""
"повідомлення про ваду,\n"
"додавши до нього максимум можливої інформації щодо образу диска.\n"
-#: inspector/virt-inspector.c:288
+#: inspector/virt-inspector.c:313
#, c-format
msgid "%s: XML write error at \"%s\": %m\n"
msgstr "%s: помилка запису XML у «%s»: %m\n"
-#: inspector/virt-inspector.c:300
+#: inspector/virt-inspector.c:325
#, c-format
msgid "%s: xmlOutputBufferCreateFd: failed to open stdout\n"
msgstr "%s: xmlOutputBufferCreateFd: не вдалося відкрити stdout\n"
-#: inspector/virt-inspector.c:308
+#: inspector/virt-inspector.c:333
#, c-format
msgid "%s: xmlNewTextWriter: failed to create libxml2 writer\n"
msgstr "%s: xmlNewTextWriter: не вдалося створити процес запису libxml2\n"
+#: inspector/virt-inspector.c:827
+#, fuzzy, c-format
+msgid "%s: unable to parse XML from stdin\n"
+msgstr "не вдалося обробити дані XML, повернуті libvirt"
+
+#: inspector/virt-inspector.c:833
+#, fuzzy, c-format
+msgid "%s: unable to create new XPath context\n"
+msgstr "не вдалося створити контекст XPath"
+
+#: inspector/virt-inspector.c:840
+#, fuzzy, c-format
+msgid "%s: unable to evaluate XPath expression\n"
+msgstr "не вдалося сформувати вираз XPath"
+
+#: inspector/virt-inspector.c:851
+#, c-format
+msgid "%s: xmlSaveToFd failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:858
+#, c-format
+msgid "%s: xmlNewDoc failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:863
+#, c-format
+msgid "%s: xmlCopyNode failed\n"
+msgstr ""
+
+#: inspector/virt-inspector.c:870
+#, c-format
+msgid "%s: xmlSaveDoc failed\n"
+msgstr ""
+
#: perl/lib/Sys/Guestfs/Lib.pm:158
msgid "open_guest: first parameter must be a string or an arrayref"
msgstr ""
diff --git a/python/Makefile.am b/python/Makefile.am
index 82960d6..2f543e7 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -1,5 +1,5 @@
# libguestfs Python bindings
-# Copyright (C) 2009 Red Hat Inc.
+# Copyright (C) 2009-2011 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -48,7 +48,8 @@ libguestfsmod_la_LDFLAGS = -avoid-version -shared
TESTS_ENVIRONMENT = \
LIBGUESTFS_PATH=$(top_builddir)/appliance \
PYTHONPATH=$(builddir):$(builddir)/.libs \
- TMPDIR=$(top_builddir)
+ TMPDIR=$(top_builddir) \
+ PYTHON=$(PYTHON)
TESTS = run-bindtests run-python-tests
diff --git a/python/Makefile.in b/python/Makefile.in
index d3cd517..1115be2 100644
--- a/python/Makefile.in
+++ b/python/Makefile.in
@@ -16,7 +16,7 @@
@SET_MAKE@
# libguestfs Python bindings
-# Copyright (C) 2009 Red Hat Inc.
+# Copyright (C) 2009-2011 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -991,7 +991,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -1279,7 +1278,8 @@ EXTRA_DIST = \
@HAVE_PYTHON_TRUE at TESTS_ENVIRONMENT = \
@HAVE_PYTHON_TRUE@ LIBGUESTFS_PATH=$(top_builddir)/appliance \
@HAVE_PYTHON_TRUE@ PYTHONPATH=$(builddir):$(builddir)/.libs \
- at HAVE_PYTHON_TRUE@ TMPDIR=$(top_builddir)
+ at HAVE_PYTHON_TRUE@ TMPDIR=$(top_builddir) \
+ at HAVE_PYTHON_TRUE@ PYTHON=$(PYTHON)
@HAVE_PYTHON_TRUE at TESTS = run-bindtests run-python-tests
all: all-am
diff --git a/python/bindtests.py b/python/bindtests.py
index bb12e7d..5297e81 100644
--- a/python/bindtests.py
+++ b/python/bindtests.py
@@ -35,4 +35,4 @@ g.test0 ("abc", "def", ["1"], 0, 1, 1, "123", "456", "abc\0abc")
g.test0 ("abc", "def", ["1"], 0, 2, 2, "123", "456", "abc\0abc")
g.test0 ("abc", "def", ["1"], 0, 4095, 4095, "123", "456", "abc\0abc")
g.test0 ("abc", "def", ["1"], 0, 0, 0, "", "", "abc\0abc")
-print "EOF"
+print ("EOF")
diff --git a/python/examples/Makefile.in b/python/examples/Makefile.in
index e6c95c9..919ad15 100644
--- a/python/examples/Makefile.in
+++ b/python/examples/Makefile.in
@@ -934,7 +934,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/python/guestfs-py-byhand.c b/python/guestfs-py-byhand.c
index 29be83b..1756963 100644
--- a/python/guestfs-py-byhand.c
+++ b/python/guestfs-py-byhand.c
@@ -168,7 +168,7 @@ py_guestfs_set_event_callback (PyObject *self, PyObject *args)
snprintf (key, sizeof key, "_python_event_%d", eh);
guestfs_set_private (g, key, py_callback);
- py_eh = PyInt_FromLong ((long) eh);
+ py_eh = PyLong_FromLong ((long) eh);
return py_eh;
}
diff --git a/python/guestfs-py.c b/python/guestfs-py.c
index 625262a..ec32085 100644
--- a/python/guestfs-py.c
+++ b/python/guestfs-py.c
@@ -20,6 +20,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <config.h>
+
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
@@ -32,6 +34,9 @@ get_string_list (PyObject *obj)
{
size_t i, len;
char **r;
+#ifndef HAVE_PYSTRING_ASSTRING
+ PyObject *bytes;
+#endif
assert (obj);
@@ -52,8 +57,14 @@ get_string_list (PyObject *obj)
return NULL;
}
- for (i = 0; i < len; ++i)
+ for (i = 0; i < len; ++i) {
+#ifdef HAVE_PYSTRING_ASSTRING
r[i] = PyString_AsString (PyList_GetItem (obj, i));
+#else
+ bytes = PyUnicode_AsUTF8String (PyList_GetItem (obj, i));
+ r[i] = PyBytes_AS_STRING (bytes);
+#endif
+ }
r[len] = NULL;
return r;
@@ -69,8 +80,13 @@ put_string_list (char * const * const argv)
;
list = PyList_New (argc);
- for (i = 0; i < argc; ++i)
+ for (i = 0; i < argc; ++i) {
+#ifdef HAVE_PYSTRING_ASSTRING
PyList_SetItem (list, i, PyString_FromString (argv[i]));
+#else
+ PyList_SetItem (list, i, PyUnicode_FromString (argv[i]));
+#endif
+ }
return list;
}
@@ -87,8 +103,13 @@ put_table (char * const * const argv)
list = PyList_New (argc >> 1);
for (i = 0; i < argc; i += 2) {
item = PyTuple_New (2);
+#ifdef HAVE_PYSTRING_ASSTRING
PyTuple_SetItem (item, 0, PyString_FromString (argv[i]));
PyTuple_SetItem (item, 1, PyString_FromString (argv[i+1]));
+#else
+ PyTuple_SetItem (item, 0, PyUnicode_FromString (argv[i]));
+ PyTuple_SetItem (item, 1, PyUnicode_FromString (argv[i+1]));
+#endif
PyList_SetItem (list, i >> 1, item);
}
@@ -125,11 +146,23 @@ put_lvm_pv (struct guestfs_lvm_pv *lvm_pv)
dict = PyDict_New ();
PyDict_SetItemString (dict, "pv_name",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (lvm_pv->pv_name));
+#else
+ PyUnicode_FromString (lvm_pv->pv_name));
+#endif
PyDict_SetItemString (dict, "pv_uuid",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromStringAndSize (lvm_pv->pv_uuid, 32));
+#else
+ PyBytes_FromStringAndSize (lvm_pv->pv_uuid, 32));
+#endif
PyDict_SetItemString (dict, "pv_fmt",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (lvm_pv->pv_fmt));
+#else
+ PyUnicode_FromString (lvm_pv->pv_fmt));
+#endif
PyDict_SetItemString (dict, "pv_size",
PyLong_FromUnsignedLongLong (lvm_pv->pv_size));
PyDict_SetItemString (dict, "dev_size",
@@ -139,13 +172,21 @@ put_lvm_pv (struct guestfs_lvm_pv *lvm_pv)
PyDict_SetItemString (dict, "pv_used",
PyLong_FromUnsignedLongLong (lvm_pv->pv_used));
PyDict_SetItemString (dict, "pv_attr",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (lvm_pv->pv_attr));
+#else
+ PyUnicode_FromString (lvm_pv->pv_attr));
+#endif
PyDict_SetItemString (dict, "pv_pe_count",
PyLong_FromLongLong (lvm_pv->pv_pe_count));
PyDict_SetItemString (dict, "pv_pe_alloc_count",
PyLong_FromLongLong (lvm_pv->pv_pe_alloc_count));
PyDict_SetItemString (dict, "pv_tags",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (lvm_pv->pv_tags));
+#else
+ PyUnicode_FromString (lvm_pv->pv_tags));
+#endif
PyDict_SetItemString (dict, "pe_start",
PyLong_FromUnsignedLongLong (lvm_pv->pe_start));
PyDict_SetItemString (dict, "pv_mda_count",
@@ -162,19 +203,39 @@ put_lvm_vg (struct guestfs_lvm_vg *lvm_vg)
dict = PyDict_New ();
PyDict_SetItemString (dict, "vg_name",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (lvm_vg->vg_name));
+#else
+ PyUnicode_FromString (lvm_vg->vg_name));
+#endif
PyDict_SetItemString (dict, "vg_uuid",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromStringAndSize (lvm_vg->vg_uuid, 32));
+#else
+ PyBytes_FromStringAndSize (lvm_vg->vg_uuid, 32));
+#endif
PyDict_SetItemString (dict, "vg_fmt",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (lvm_vg->vg_fmt));
+#else
+ PyUnicode_FromString (lvm_vg->vg_fmt));
+#endif
PyDict_SetItemString (dict, "vg_attr",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (lvm_vg->vg_attr));
+#else
+ PyUnicode_FromString (lvm_vg->vg_attr));
+#endif
PyDict_SetItemString (dict, "vg_size",
PyLong_FromUnsignedLongLong (lvm_vg->vg_size));
PyDict_SetItemString (dict, "vg_free",
PyLong_FromUnsignedLongLong (lvm_vg->vg_free));
PyDict_SetItemString (dict, "vg_sysid",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (lvm_vg->vg_sysid));
+#else
+ PyUnicode_FromString (lvm_vg->vg_sysid));
+#endif
PyDict_SetItemString (dict, "vg_extent_size",
PyLong_FromUnsignedLongLong (lvm_vg->vg_extent_size));
PyDict_SetItemString (dict, "vg_extent_count",
@@ -194,7 +255,11 @@ put_lvm_vg (struct guestfs_lvm_vg *lvm_vg)
PyDict_SetItemString (dict, "vg_seqno",
PyLong_FromLongLong (lvm_vg->vg_seqno));
PyDict_SetItemString (dict, "vg_tags",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (lvm_vg->vg_tags));
+#else
+ PyUnicode_FromString (lvm_vg->vg_tags));
+#endif
PyDict_SetItemString (dict, "vg_mda_count",
PyLong_FromLongLong (lvm_vg->vg_mda_count));
PyDict_SetItemString (dict, "vg_mda_free",
@@ -209,11 +274,23 @@ put_lvm_lv (struct guestfs_lvm_lv *lvm_lv)
dict = PyDict_New ();
PyDict_SetItemString (dict, "lv_name",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (lvm_lv->lv_name));
+#else
+ PyUnicode_FromString (lvm_lv->lv_name));
+#endif
PyDict_SetItemString (dict, "lv_uuid",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromStringAndSize (lvm_lv->lv_uuid, 32));
+#else
+ PyBytes_FromStringAndSize (lvm_lv->lv_uuid, 32));
+#endif
PyDict_SetItemString (dict, "lv_attr",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (lvm_lv->lv_attr));
+#else
+ PyUnicode_FromString (lvm_lv->lv_attr));
+#endif
PyDict_SetItemString (dict, "lv_major",
PyLong_FromLongLong (lvm_lv->lv_major));
PyDict_SetItemString (dict, "lv_minor",
@@ -227,7 +304,11 @@ put_lvm_lv (struct guestfs_lvm_lv *lvm_lv)
PyDict_SetItemString (dict, "seg_count",
PyLong_FromLongLong (lvm_lv->seg_count));
PyDict_SetItemString (dict, "origin",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (lvm_lv->origin));
+#else
+ PyUnicode_FromString (lvm_lv->origin));
+#endif
if (lvm_lv->snap_percent >= 0)
PyDict_SetItemString (dict, "snap_percent",
PyFloat_FromDouble ((double) lvm_lv->snap_percent));
@@ -243,13 +324,29 @@ put_lvm_lv (struct guestfs_lvm_lv *lvm_lv)
PyDict_SetItemString (dict, "copy_percent", Py_None);
}
PyDict_SetItemString (dict, "move_pv",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (lvm_lv->move_pv));
+#else
+ PyUnicode_FromString (lvm_lv->move_pv));
+#endif
PyDict_SetItemString (dict, "lv_tags",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (lvm_lv->lv_tags));
+#else
+ PyUnicode_FromString (lvm_lv->lv_tags));
+#endif
PyDict_SetItemString (dict, "mirror_log",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (lvm_lv->mirror_log));
+#else
+ PyUnicode_FromString (lvm_lv->mirror_log));
+#endif
PyDict_SetItemString (dict, "modules",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (lvm_lv->modules));
+#else
+ PyUnicode_FromString (lvm_lv->modules));
+#endif
return dict;
};
@@ -327,10 +424,19 @@ put_dirent (struct guestfs_dirent *dirent)
dict = PyDict_New ();
PyDict_SetItemString (dict, "ino",
PyLong_FromLongLong (dirent->ino));
+#ifdef HAVE_PYSTRING_ASSTRING
PyDict_SetItemString (dict, "ftyp",
PyString_FromStringAndSize (&dirent->ftyp, 1));
+#else
+ PyDict_SetItemString (dict, "ftyp",
+ PyUnicode_FromStringAndSize (&dirent->ftyp, 1));
+#endif
PyDict_SetItemString (dict, "name",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (dirent->name));
+#else
+ PyUnicode_FromString (dirent->name));
+#endif
return dict;
};
@@ -347,7 +453,11 @@ put_version (struct guestfs_version *version)
PyDict_SetItemString (dict, "release",
PyLong_FromLongLong (version->release));
PyDict_SetItemString (dict, "extra",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (version->extra));
+#else
+ PyUnicode_FromString (version->extra));
+#endif
return dict;
};
@@ -358,9 +468,17 @@ put_xattr (struct guestfs_xattr *xattr)
dict = PyDict_New ();
PyDict_SetItemString (dict, "attrname",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (xattr->attrname));
+#else
+ PyUnicode_FromString (xattr->attrname));
+#endif
PyDict_SetItemString (dict, "attrval",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromStringAndSize (xattr->attrval, xattr->attrval_len));
+#else
+ PyBytes_FromStringAndSize (xattr->attrval, xattr->attrval_len));
+#endif
return dict;
};
@@ -377,7 +495,11 @@ put_inotify_event (struct guestfs_inotify_event *inotify_event)
PyDict_SetItemString (dict, "in_cookie",
PyLong_FromUnsignedLong (inotify_event->in_cookie));
PyDict_SetItemString (dict, "in_name",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (inotify_event->in_name));
+#else
+ PyUnicode_FromString (inotify_event->in_name));
+#endif
return dict;
};
@@ -405,29 +527,73 @@ put_application (struct guestfs_application *application)
dict = PyDict_New ();
PyDict_SetItemString (dict, "app_name",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (application->app_name));
+#else
+ PyUnicode_FromString (application->app_name));
+#endif
PyDict_SetItemString (dict, "app_display_name",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (application->app_display_name));
+#else
+ PyUnicode_FromString (application->app_display_name));
+#endif
PyDict_SetItemString (dict, "app_epoch",
PyLong_FromLong (application->app_epoch));
PyDict_SetItemString (dict, "app_version",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (application->app_version));
+#else
+ PyUnicode_FromString (application->app_version));
+#endif
PyDict_SetItemString (dict, "app_release",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (application->app_release));
+#else
+ PyUnicode_FromString (application->app_release));
+#endif
PyDict_SetItemString (dict, "app_install_path",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (application->app_install_path));
+#else
+ PyUnicode_FromString (application->app_install_path));
+#endif
PyDict_SetItemString (dict, "app_trans_path",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (application->app_trans_path));
+#else
+ PyUnicode_FromString (application->app_trans_path));
+#endif
PyDict_SetItemString (dict, "app_publisher",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (application->app_publisher));
+#else
+ PyUnicode_FromString (application->app_publisher));
+#endif
PyDict_SetItemString (dict, "app_url",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (application->app_url));
+#else
+ PyUnicode_FromString (application->app_url));
+#endif
PyDict_SetItemString (dict, "app_source_package",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (application->app_source_package));
+#else
+ PyUnicode_FromString (application->app_source_package));
+#endif
PyDict_SetItemString (dict, "app_summary",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (application->app_summary));
+#else
+ PyUnicode_FromString (application->app_summary));
+#endif
PyDict_SetItemString (dict, "app_description",
+#ifdef HAVE_PYSTRING_ASSTRING
PyString_FromString (application->app_description));
+#else
+ PyUnicode_FromString (application->app_description));
+#endif
return dict;
};
@@ -613,7 +779,7 @@ py_guestfs_test0rint (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -644,7 +810,7 @@ py_guestfs_test0rinterr (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -739,7 +905,7 @@ py_guestfs_test0rbool (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -770,7 +936,7 @@ py_guestfs_test0rboolerr (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -802,7 +968,11 @@ py_guestfs_test0rconststring (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
return py_r;
}
@@ -833,7 +1003,11 @@ py_guestfs_test0rconststringerr (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
return py_r;
}
@@ -861,9 +1035,13 @@ py_guestfs_test0rconstoptstring (PyObject *self, PyObject *args)
PyEval_RestoreThread (py_save);
- if (r)
+ if (r) {
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
- else {
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
+ } else {
Py_INCREF (Py_None);
py_r = Py_None;
}
@@ -893,9 +1071,13 @@ py_guestfs_test0rconstoptstringerr (PyObject *self, PyObject *args)
PyEval_RestoreThread (py_save);
- if (r)
+ if (r) {
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
- else {
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
+ } else {
Py_INCREF (Py_None);
py_r = Py_None;
}
@@ -930,7 +1112,11 @@ py_guestfs_test0rstring (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -962,7 +1148,11 @@ py_guestfs_test0rstringerr (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -1516,7 +1706,11 @@ py_guestfs_get_qemu (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
return py_r;
}
@@ -1580,7 +1774,11 @@ py_guestfs_get_path (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
return py_r;
}
@@ -1640,9 +1838,13 @@ py_guestfs_get_append (PyObject *self, PyObject *args)
PyEval_RestoreThread (py_save);
- if (r)
+ if (r) {
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
- else {
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
+ } else {
Py_INCREF (Py_None);
py_r = Py_None;
}
@@ -1709,7 +1911,7 @@ py_guestfs_get_autosync (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -1773,7 +1975,7 @@ py_guestfs_get_verbose (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -1804,7 +2006,7 @@ py_guestfs_is_ready (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -1835,7 +2037,7 @@ py_guestfs_is_config (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -1866,7 +2068,7 @@ py_guestfs_is_launching (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -1897,7 +2099,7 @@ py_guestfs_is_busy (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -1928,7 +2130,7 @@ py_guestfs_get_state (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -1992,7 +2194,7 @@ py_guestfs_get_memsize (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -2023,7 +2225,7 @@ py_guestfs_get_pid (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -2119,7 +2321,7 @@ py_guestfs_get_selinux (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -2183,7 +2385,7 @@ py_guestfs_get_trace (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -2247,7 +2449,7 @@ py_guestfs_get_direct (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -2311,7 +2513,7 @@ py_guestfs_get_recovery_proc (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -2411,7 +2613,11 @@ py_guestfs_file_architecture (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -2476,7 +2682,11 @@ py_guestfs_inspect_get_type (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -2509,7 +2719,11 @@ py_guestfs_inspect_get_arch (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -2542,7 +2756,11 @@ py_guestfs_inspect_get_distro (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -2575,7 +2793,7 @@ py_guestfs_inspect_get_major_version (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -2607,7 +2825,7 @@ py_guestfs_inspect_get_minor_version (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -2639,7 +2857,11 @@ py_guestfs_inspect_get_product_name (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -2770,7 +2992,7 @@ py_guestfs_get_network (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -2892,7 +3114,11 @@ py_guestfs_inspect_get_windows_systemroot (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -3056,7 +3282,7 @@ py_guestfs_add_domain (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -3088,7 +3314,11 @@ py_guestfs_inspect_get_package_format (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -3121,7 +3351,11 @@ py_guestfs_inspect_get_package_management (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -3187,7 +3421,11 @@ py_guestfs_inspect_get_hostname (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -3220,7 +3458,11 @@ py_guestfs_inspect_get_format (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -3253,7 +3495,7 @@ py_guestfs_inspect_is_live (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -3285,7 +3527,7 @@ py_guestfs_inspect_is_netinst (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -3317,7 +3559,7 @@ py_guestfs_inspect_is_multipart (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -3381,7 +3623,11 @@ py_guestfs_get_attach_method (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -3414,7 +3660,11 @@ py_guestfs_inspect_get_product_variant (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -3447,7 +3697,11 @@ py_guestfs_inspect_get_windows_current_control_set (PyObject *self, PyObject *ar
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -3529,7 +3783,11 @@ py_guestfs_inspect_get_icon (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromStringAndSize (r, size);
+#else
+ py_r = PyBytes_FromStringAndSize (r, size);
+#endif
free (r);
return py_r;
}
@@ -3594,7 +3852,7 @@ py_guestfs_get_pgroup (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -3658,7 +3916,7 @@ py_guestfs_get_smp (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -3789,7 +4047,11 @@ py_guestfs_cat (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -3822,7 +4084,11 @@ py_guestfs_ll (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -4244,7 +4510,7 @@ py_guestfs_aug_defvar (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -4311,7 +4577,11 @@ py_guestfs_aug_get (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -4413,7 +4683,7 @@ py_guestfs_aug_rm (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -4843,7 +5113,7 @@ py_guestfs_exists (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -4875,7 +5145,7 @@ py_guestfs_is_file (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -4907,7 +5177,7 @@ py_guestfs_is_dir (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -5284,7 +5554,11 @@ py_guestfs_file (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -5321,7 +5595,11 @@ py_guestfs_command (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -5589,7 +5867,7 @@ py_guestfs_blockdev_getro (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -5621,7 +5899,7 @@ py_guestfs_blockdev_getss (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -5653,7 +5931,7 @@ py_guestfs_blockdev_getbsz (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -5918,7 +6196,11 @@ py_guestfs_checksum (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -6197,7 +6479,11 @@ py_guestfs_debug (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -6363,7 +6649,11 @@ py_guestfs_get_e2label (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -6430,7 +6720,11 @@ py_guestfs_get_e2uuid (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -6464,7 +6758,7 @@ py_guestfs_fsck (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -6697,7 +6991,11 @@ py_guestfs_dmesg (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -6763,7 +7061,7 @@ py_guestfs_equal (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -6862,7 +7160,11 @@ py_guestfs_hexdump (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -6999,7 +7301,11 @@ py_guestfs_sfdisk_l (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -7032,7 +7338,11 @@ py_guestfs_sfdisk_kernel_geometry (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -7065,7 +7375,11 @@ py_guestfs_sfdisk_disk_geometry (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -7336,7 +7650,7 @@ py_guestfs_ntfs_3g_probe (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -7368,7 +7682,11 @@ py_guestfs_sh (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -7566,7 +7884,11 @@ py_guestfs_mkdtemp (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -7599,7 +7921,7 @@ py_guestfs_wc_l (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -7631,7 +7953,7 @@ py_guestfs_wc_w (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -7663,7 +7985,7 @@ py_guestfs_wc_c (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -7828,7 +8150,11 @@ py_guestfs_df (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -7860,7 +8186,11 @@ py_guestfs_df_h (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -8235,7 +8565,7 @@ py_guestfs_umask (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -8339,7 +8669,11 @@ py_guestfs_zfile (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -8677,7 +9011,11 @@ py_guestfs_read_file (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromStringAndSize (r, size);
+#else
+ py_r = PyBytes_FromStringAndSize (r, size);
+#endif
free (r);
return py_r;
}
@@ -9118,7 +9456,11 @@ py_guestfs_realpath (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -9287,7 +9629,11 @@ py_guestfs_readlink (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -9878,7 +10224,11 @@ py_guestfs_getcon (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -10195,7 +10545,11 @@ py_guestfs_echo_daemon (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -10262,7 +10616,11 @@ py_guestfs_case_sensitive_path (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -10295,7 +10653,11 @@ py_guestfs_vfs_type (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -10618,7 +10980,11 @@ py_guestfs_pread (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromStringAndSize (r, size);
+#else
+ py_r = PyBytes_FromStringAndSize (r, size);
+#endif
free (r);
return py_r;
}
@@ -10858,7 +11224,11 @@ py_guestfs_part_get_parttype (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -11099,7 +11469,11 @@ py_guestfs_initrd_cat (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromStringAndSize (r, size);
+#else
+ py_r = PyBytes_FromStringAndSize (r, size);
+#endif
free (r);
return py_r;
}
@@ -11132,7 +11506,11 @@ py_guestfs_pvuuid (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -11165,7 +11543,11 @@ py_guestfs_vguuid (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -11198,7 +11580,11 @@ py_guestfs_lvuuid (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -11533,7 +11919,7 @@ py_guestfs_part_get_bootable (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -11566,7 +11952,7 @@ py_guestfs_part_get_mbr_id (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -11634,7 +12020,11 @@ py_guestfs_checksum_device (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -11733,7 +12123,7 @@ py_guestfs_get_umask (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -11976,7 +12366,7 @@ py_guestfs_pwrite (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -12176,7 +12566,11 @@ py_guestfs_vfs_label (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -12209,7 +12603,11 @@ py_guestfs_vfs_uuid (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -12556,7 +12954,7 @@ py_guestfs_is_lv (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -12588,7 +12986,11 @@ py_guestfs_findfs_uuid (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -12621,7 +13023,11 @@ py_guestfs_findfs_label (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -12654,7 +13060,7 @@ py_guestfs_is_chardev (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -12686,7 +13092,7 @@ py_guestfs_is_blockdev (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -12718,7 +13124,7 @@ py_guestfs_is_fifo (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -12750,7 +13156,7 @@ py_guestfs_is_symlink (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -12782,7 +13188,7 @@ py_guestfs_is_socket (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -12814,7 +13220,11 @@ py_guestfs_part_to_dev (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -12921,7 +13331,7 @@ py_guestfs_pwrite_device (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -12956,7 +13366,11 @@ py_guestfs_pread_device (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromStringAndSize (r, size);
+#else
+ py_r = PyBytes_FromStringAndSize (r, size);
+#endif
free (r);
return py_r;
}
@@ -12989,7 +13403,11 @@ py_guestfs_lvm_canonical_lv_name (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromString (r);
+#else
+ py_r = PyUnicode_FromString (r);
+#endif
free (r);
return py_r;
}
@@ -13083,7 +13501,11 @@ py_guestfs_getxattr (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromStringAndSize (r, size);
+#else
+ py_r = PyBytes_FromStringAndSize (r, size);
+#endif
free (r);
return py_r;
}
@@ -13118,7 +13540,11 @@ py_guestfs_lgetxattr (PyObject *self, PyObject *args)
return NULL;
}
+#ifdef HAVE_PYSTRING_ASSTRING
py_r = PyString_FromStringAndSize (r, size);
+#else
+ py_r = PyBytes_FromStringAndSize (r, size);
+#endif
free (r);
return py_r;
}
@@ -13216,7 +13642,7 @@ py_guestfs_is_zero (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -13248,7 +13674,7 @@ py_guestfs_is_zero_device (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -13604,7 +14030,7 @@ py_guestfs_part_to_partnum (PyObject *self, PyObject *args)
return NULL;
}
- py_r = PyInt_FromLong ((long) r);
+ py_r = PyLong_FromLong ((long) r);
return py_r;
}
@@ -14225,12 +14651,44 @@ static PyMethodDef methods[] = {
{ NULL, NULL, 0, NULL }
};
+#if PY_MAJOR_VERSION >= 3
+static struct PyModuleDef moduledef = {
+ PyModuleDef_HEAD_INIT,
+ "libguestfsmod", /* m_name */
+ "libguestfs module", /* m_doc */
+ -1, /* m_size */
+ methods, /* m_methods */
+ NULL, /* m_reload */
+ NULL, /* m_traverse */
+ NULL, /* m_clear */
+ NULL, /* m_free */
+};
+#endif
+
+static PyObject *
+moduleinit (void)
+{
+ PyObject *m;
+
+#if PY_MAJOR_VERSION >= 3
+ m = PyModule_Create (&moduledef);
+#else
+ m = Py_InitModule ((char *) "libguestfsmod", methods);
+#endif
+
+ return m; /* m might be NULL if module init failed */
+}
+
+#if PY_MAJOR_VERSION >= 3
+PyMODINIT_FUNC
+PyInit_libguestfsmod (void)
+{
+ return moduleinit ();
+}
+#else
void
initlibguestfsmod (void)
{
- static int initialized = 0;
-
- if (initialized) return;
- Py_InitModule ((char *) "libguestfsmod", methods);
- initialized = 1;
+ (void) moduleinit ();
}
+#endif
diff --git a/python/guestfs.py b/python/guestfs.py
index 24698c5..b4d1cb4 100644
--- a/python/guestfs.py
+++ b/python/guestfs.py
@@ -19,7 +19,7 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-u"""Python bindings for libguestfs
+"""Python bindings for libguestfs
import guestfs
g = guestfs.GuestFS ()
@@ -96,7 +96,7 @@ class GuestFS:
raise ClosedHandle ("GuestFS: method called on closed handle")
def close (self):
- u"""Explicitly close the guestfs handle.
+ """Explicitly close the guestfs handle.
The handle is closed implicitly when its reference count goes
to zero (eg. when it goes out of scope or the program ends).
@@ -111,7 +111,7 @@ class GuestFS:
self._o = None
def set_event_callback (self, cb, event_bitmask):
- u"""Register an event callback.
+ """Register an event callback.
Register "cb" as a callback function for all of the
events in "event_bitmask". "event_bitmask" should be
@@ -136,7 +136,7 @@ class GuestFS:
return libguestfsmod.set_event_callback (self._o, cb, event_bitmask)
def delete_event_callback (self, event_handle):
- u"""Delete an event callback."""
+ """Delete an event callback."""
self._check_not_closed ()
libguestfsmod.delete_event_callback (self._o, event_handle)
@@ -226,7 +226,7 @@ class GuestFS:
return libguestfsmod.test0rhashtableerr (self._o)
def launch (self):
- u"""Internally libguestfs is implemented by running a
+ """Internally libguestfs is implemented by running a
virtual machine using qemu(1).
You should call this after configuring the handle (eg.
@@ -236,7 +236,7 @@ class GuestFS:
return libguestfsmod.launch (self._o)
def wait_ready (self):
- u"""This function is a no op.
+ """This function is a no op.
In versions of the API < 1.0.71 you had to call this
function just after calling "g.launch" to wait for the
@@ -258,14 +258,14 @@ class GuestFS:
return libguestfsmod.wait_ready (self._o)
def kill_subprocess (self):
- u"""This kills the qemu subprocess. You should never need to
+ """This kills the qemu subprocess. You should never need to
call this.
"""
self._check_not_closed ()
return libguestfsmod.kill_subprocess (self._o)
def add_drive (self, filename):
- u"""This function is the equivalent of calling
+ """This function is the equivalent of calling
"g.add_drive_opts" with no optional parameters, so the
disk is added writable, with the format being detected
automatically.
@@ -282,7 +282,7 @@ class GuestFS:
return libguestfsmod.add_drive (self._o, filename)
def add_cdrom (self, filename):
- u"""This function adds a virtual CD-ROM disk image to the
+ """This function adds a virtual CD-ROM disk image to the
guest.
This is equivalent to the qemu parameter *-cdrom
@@ -312,7 +312,7 @@ class GuestFS:
return libguestfsmod.add_cdrom (self._o, filename)
def add_drive_ro (self, filename):
- u"""This function is the equivalent of calling
+ """This function is the equivalent of calling
"g.add_drive_opts" with the optional parameter
"GUESTFS_ADD_DRIVE_OPTS_READONLY" set to 1, so the disk
is added read-only, with the format being detected
@@ -322,7 +322,7 @@ class GuestFS:
return libguestfsmod.add_drive_ro (self._o, filename)
def config (self, qemuparam, qemuvalue):
- u"""This can be used to add arbitrary qemu command line
+ """This can be used to add arbitrary qemu command line
parameters of the form *-param value*. Actually it's not
quite arbitrary - we prevent you from setting some
parameters which would interfere with parameters that we
@@ -337,7 +337,7 @@ class GuestFS:
return libguestfsmod.config (self._o, qemuparam, qemuvalue)
def set_qemu (self, qemu):
- u"""Set the qemu binary that we will use.
+ """Set the qemu binary that we will use.
The default is chosen when the library was compiled by
the configure script.
@@ -361,7 +361,7 @@ class GuestFS:
return libguestfsmod.set_qemu (self._o, qemu)
def get_qemu (self):
- u"""Return the current qemu binary.
+ """Return the current qemu binary.
This is always non-NULL. If it wasn't set already, then
this will return the default qemu binary name.
@@ -370,7 +370,7 @@ class GuestFS:
return libguestfsmod.get_qemu (self._o)
def set_path (self, searchpath):
- u"""Set the path that libguestfs searches for kernel and
+ """Set the path that libguestfs searches for kernel and
initrd.img.
The default is "$libdir/guestfs" unless overridden by
@@ -382,7 +382,7 @@ class GuestFS:
return libguestfsmod.set_path (self._o, searchpath)
def get_path (self):
- u"""Return the current search path.
+ """Return the current search path.
This is always non-NULL. If it wasn't set already, then
this will return the default path.
@@ -391,7 +391,7 @@ class GuestFS:
return libguestfsmod.get_path (self._o)
def set_append (self, append):
- u"""This function is used to add additional options to the
+ """This function is used to add additional options to the
guest kernel command line.
The default is "NULL" unless overridden by setting
@@ -404,7 +404,7 @@ class GuestFS:
return libguestfsmod.set_append (self._o, append)
def get_append (self):
- u"""Return the additional kernel options which are added to
+ """Return the additional kernel options which are added to
the guest kernel command line.
If "NULL" then no options are added.
@@ -413,7 +413,7 @@ class GuestFS:
return libguestfsmod.get_append (self._o)
def set_autosync (self, autosync):
- u"""If "autosync" is true, this enables autosync. Libguestfs
+ """If "autosync" is true, this enables autosync. Libguestfs
will make a best effort attempt to make filesystems
consistent and synchronized when the handle is closed
(also if the program exits without closing handles).
@@ -425,13 +425,13 @@ class GuestFS:
return libguestfsmod.set_autosync (self._o, autosync)
def get_autosync (self):
- u"""Get the autosync flag.
+ """Get the autosync flag.
"""
self._check_not_closed ()
return libguestfsmod.get_autosync (self._o)
def set_verbose (self, verbose):
- u"""If "verbose" is true, this turns on verbose messages.
+ """If "verbose" is true, this turns on verbose messages.
Verbose messages are disabled unless the environment
variable "LIBGUESTFS_DEBUG" is defined and set to 1.
@@ -444,13 +444,13 @@ class GuestFS:
return libguestfsmod.set_verbose (self._o, verbose)
def get_verbose (self):
- u"""This returns the verbose messages flag.
+ """This returns the verbose messages flag.
"""
self._check_not_closed ()
return libguestfsmod.get_verbose (self._o)
def is_ready (self):
- u"""This returns true iff this handle is ready to accept
+ """This returns true iff this handle is ready to accept
commands (in the "READY" state).
For more information on states, see guestfs(3).
@@ -459,7 +459,7 @@ class GuestFS:
return libguestfsmod.is_ready (self._o)
def is_config (self):
- u"""This returns true iff this handle is being configured
+ """This returns true iff this handle is being configured
(in the "CONFIG" state).
For more information on states, see guestfs(3).
@@ -468,7 +468,7 @@ class GuestFS:
return libguestfsmod.is_config (self._o)
def is_launching (self):
- u"""This returns true iff this handle is launching the
+ """This returns true iff this handle is launching the
subprocess (in the "LAUNCHING" state).
For more information on states, see guestfs(3).
@@ -477,7 +477,7 @@ class GuestFS:
return libguestfsmod.is_launching (self._o)
def is_busy (self):
- u"""This returns true iff this handle is busy processing a
+ """This returns true iff this handle is busy processing a
command (in the "BUSY" state).
For more information on states, see guestfs(3).
@@ -486,7 +486,7 @@ class GuestFS:
return libguestfsmod.is_busy (self._o)
def get_state (self):
- u"""This returns the current state as an opaque integer.
+ """This returns the current state as an opaque integer.
This is only useful for printing debug and internal
error messages.
@@ -496,7 +496,7 @@ class GuestFS:
return libguestfsmod.get_state (self._o)
def set_memsize (self, memsize):
- u"""This sets the memory size in megabytes allocated to the
+ """This sets the memory size in megabytes allocated to the
qemu subprocess. This only has any effect if called
before "g.launch".
@@ -511,7 +511,7 @@ class GuestFS:
return libguestfsmod.set_memsize (self._o, memsize)
def get_memsize (self):
- u"""This gets the memory size in megabytes allocated to the
+ """This gets the memory size in megabytes allocated to the
qemu subprocess.
If "g.set_memsize" was not called on this handle, and if
@@ -525,7 +525,7 @@ class GuestFS:
return libguestfsmod.get_memsize (self._o)
def get_pid (self):
- u"""Return the process ID of the qemu subprocess. If there
+ """Return the process ID of the qemu subprocess. If there
is no qemu subprocess, then this will return an error.
This is an internal call used for debugging and testing.
@@ -534,7 +534,7 @@ class GuestFS:
return libguestfsmod.get_pid (self._o)
def version (self):
- u"""Return the libguestfs version number that the program is
+ """Return the libguestfs version number that the program is
linked against.
Note that because of dynamic linking this is not
@@ -573,7 +573,7 @@ class GuestFS:
return libguestfsmod.version (self._o)
def set_selinux (self, selinux):
- u"""This sets the selinux flag that is passed to the
+ """This sets the selinux flag that is passed to the
appliance at boot time. The default is "selinux=0"
(disabled).
@@ -587,7 +587,7 @@ class GuestFS:
return libguestfsmod.set_selinux (self._o, selinux)
def get_selinux (self):
- u"""This returns the current setting of the selinux flag
+ """This returns the current setting of the selinux flag
which is passed to the appliance at boot time. See
"g.set_selinux".
@@ -598,7 +598,7 @@ class GuestFS:
return libguestfsmod.get_selinux (self._o)
def set_trace (self, trace):
- u"""If the command trace flag is set to 1, then libguestfs
+ """If the command trace flag is set to 1, then libguestfs
calls, parameters and return values are traced.
If you want to trace C API calls into libguestfs (and
@@ -616,13 +616,13 @@ class GuestFS:
return libguestfsmod.set_trace (self._o, trace)
def get_trace (self):
- u"""Return the command trace flag.
+ """Return the command trace flag.
"""
self._check_not_closed ()
return libguestfsmod.get_trace (self._o)
def set_direct (self, direct):
- u"""If the direct appliance mode flag is enabled, then stdin
+ """If the direct appliance mode flag is enabled, then stdin
and stdout are passed directly through to the appliance
once it is launched.
@@ -639,13 +639,13 @@ class GuestFS:
return libguestfsmod.set_direct (self._o, direct)
def get_direct (self):
- u"""Return the direct appliance mode flag.
+ """Return the direct appliance mode flag.
"""
self._check_not_closed ()
return libguestfsmod.get_direct (self._o)
def set_recovery_proc (self, recoveryproc):
- u"""If this is called with the parameter "false" then
+ """If this is called with the parameter "false" then
"g.launch" does not create a recovery process. The
purpose of the recovery process is to stop runaway qemu
processes in the case where the main program aborts
@@ -665,13 +665,13 @@ class GuestFS:
return libguestfsmod.set_recovery_proc (self._o, recoveryproc)
def get_recovery_proc (self):
- u"""Return the recovery process enabled flag.
+ """Return the recovery process enabled flag.
"""
self._check_not_closed ()
return libguestfsmod.get_recovery_proc (self._o)
def add_drive_with_if (self, filename, iface):
- u"""This is the same as "g.add_drive" but it allows you to
+ """This is the same as "g.add_drive" but it allows you to
specify the QEMU interface emulation to use at run time.
*This function is deprecated.* In new code, use the
@@ -685,7 +685,7 @@ class GuestFS:
return libguestfsmod.add_drive_with_if (self._o, filename, iface)
def add_drive_ro_with_if (self, filename, iface):
- u"""This is the same as "g.add_drive_ro" but it allows you
+ """This is the same as "g.add_drive_ro" but it allows you
to specify the QEMU interface emulation to use at run
time.
@@ -700,7 +700,7 @@ class GuestFS:
return libguestfsmod.add_drive_ro_with_if (self._o, filename, iface)
def file_architecture (self, filename):
- u"""This detects the architecture of the binary "filename",
+ """This detects the architecture of the binary "filename",
and returns it if known.
Currently defined architectures are:
@@ -771,7 +771,7 @@ class GuestFS:
return libguestfsmod.file_architecture (self._o, filename)
def inspect_os (self):
- u"""This function uses other libguestfs functions and
+ """This function uses other libguestfs functions and
certain heuristics to inspect the disk(s) (usually disks
belonging to a virtual machine), looking for operating
systems.
@@ -813,7 +813,7 @@ class GuestFS:
return libguestfsmod.inspect_os (self._o)
def inspect_get_type (self, root):
- u"""This returns the type of the inspected operating system.
+ """This returns the type of the inspected operating system.
Currently defined types are:
"linux"
@@ -841,7 +841,7 @@ class GuestFS:
return libguestfsmod.inspect_get_type (self._o, root)
def inspect_get_arch (self, root):
- u"""This returns the architecture of the inspected operating
+ """This returns the architecture of the inspected operating
system. The possible return values are listed under
"g.file_architecture".
@@ -854,7 +854,7 @@ class GuestFS:
return libguestfsmod.inspect_get_arch (self._o, root)
def inspect_get_distro (self, root):
- u"""This returns the distro (distribution) of the inspected
+ """This returns the distro (distribution) of the inspected
operating system.
Currently defined distros are:
@@ -927,7 +927,7 @@ class GuestFS:
return libguestfsmod.inspect_get_distro (self._o, root)
def inspect_get_major_version (self, root):
- u"""This returns the major version number of the inspected
+ """This returns the major version number of the inspected
operating system.
Windows uses a consistent versioning scheme which is
@@ -946,7 +946,7 @@ class GuestFS:
return libguestfsmod.inspect_get_major_version (self._o, root)
def inspect_get_minor_version (self, root):
- u"""This returns the minor version number of the inspected
+ """This returns the minor version number of the inspected
operating system.
If the version could not be determined, then 0 is
@@ -959,7 +959,7 @@ class GuestFS:
return libguestfsmod.inspect_get_minor_version (self._o, root)
def inspect_get_product_name (self, root):
- u"""This returns the product name of the inspected operating
+ """This returns the product name of the inspected operating
system. The product name is generally some freeform
string which can be displayed to the user, but should
not be parsed by programs.
@@ -973,7 +973,7 @@ class GuestFS:
return libguestfsmod.inspect_get_product_name (self._o, root)
def inspect_get_mountpoints (self, root):
- u"""This returns a hash of where we think the filesystems
+ """This returns a hash of where we think the filesystems
associated with this operating system should be mounted.
Callers should note that this is at best an educated
guess made by reading configuration files such as
@@ -1005,7 +1005,7 @@ class GuestFS:
return libguestfsmod.inspect_get_mountpoints (self._o, root)
def inspect_get_filesystems (self, root):
- u"""This returns a list of all the filesystems that we think
+ """This returns a list of all the filesystems that we think
are associated with this operating system. This includes
the root filesystem, other ordinary filesystems, and
non-mounted devices like swap partitions.
@@ -1023,7 +1023,7 @@ class GuestFS:
return libguestfsmod.inspect_get_filesystems (self._o, root)
def set_network (self, network):
- u"""If "network" is true, then the network is enabled in the
+ """If "network" is true, then the network is enabled in the
libguestfs appliance. The default is false.
This affects whether commands are able to access the
@@ -1036,13 +1036,13 @@ class GuestFS:
return libguestfsmod.set_network (self._o, network)
def get_network (self):
- u"""This returns the enable network flag.
+ """This returns the enable network flag.
"""
self._check_not_closed ()
return libguestfsmod.get_network (self._o)
def list_filesystems (self):
- u"""This inspection command looks for filesystems on
+ """This inspection command looks for filesystems on
partitions, block devices and logical volumes, returning
a list of devices containing filesystems and their type.
@@ -1078,7 +1078,7 @@ class GuestFS:
return libguestfsmod.list_filesystems (self._o)
def add_drive_opts (self, filename, readonly=-1, format=None, iface=None, name=None):
- u"""This function adds a virtual machine disk image
+ """This function adds a virtual machine disk image
"filename" to libguestfs. The first time you call this
function, the disk appears as "/dev/sda", the second
time as "/dev/sdb", and so on.
@@ -1126,7 +1126,7 @@ class GuestFS:
return libguestfsmod.add_drive_opts (self._o, filename, readonly, format, iface, name)
def inspect_get_windows_systemroot (self, root):
- u"""This returns the Windows systemroot of the inspected
+ """This returns the Windows systemroot of the inspected
guest. The systemroot is a directory path such as
"/WINDOWS".
@@ -1140,7 +1140,7 @@ class GuestFS:
return libguestfsmod.inspect_get_windows_systemroot (self._o, root)
def inspect_get_roots (self):
- u"""This function is a convenient way to get the list of
+ """This function is a convenient way to get the list of
root devices, as returned from a previous call to
"g.inspect_os", but without redoing the whole inspection
process.
@@ -1164,7 +1164,7 @@ class GuestFS:
return libguestfsmod.debug_drives (self._o)
def add_domain (self, dom, libvirturi=None, readonly=-1, iface=None, live=-1, allowuuid=-1, readonlydisk=None):
- u"""This function adds the disk(s) attached to the named
+ """This function adds the disk(s) attached to the named
libvirt domain "dom". It works by connecting to libvirt,
requesting the domain and domain XML from libvirt,
parsing it for disks, and calling "g.add_drive_opts" on
@@ -1250,7 +1250,7 @@ class GuestFS:
return libguestfsmod.add_domain (self._o, dom, libvirturi, readonly, iface, live, allowuuid, readonlydisk)
def inspect_get_package_format (self, root):
- u"""This function and "g.inspect_get_package_management"
+ """This function and "g.inspect_get_package_management"
return the package format and package management tool
used by the inspected operating system. For example for
Fedora these functions would return "rpm" (package
@@ -1271,7 +1271,7 @@ class GuestFS:
return libguestfsmod.inspect_get_package_format (self._o, root)
def inspect_get_package_management (self, root):
- u""""g.inspect_get_package_format" and this function return
+ """"g.inspect_get_package_format" and this function return
the package format and package management tool used by
the inspected operating system. For example for Fedora
these functions would return "rpm" (package format) and
@@ -1293,7 +1293,7 @@ class GuestFS:
return libguestfsmod.inspect_get_package_management (self._o, root)
def inspect_list_applications (self, root):
- u"""Return the list of applications installed in the
+ """Return the list of applications installed in the
operating system.
*Note:* This call works differently from other parts of
@@ -1387,7 +1387,7 @@ class GuestFS:
return libguestfsmod.inspect_list_applications (self._o, root)
def inspect_get_hostname (self, root):
- u"""This function returns the hostname of the operating
+ """This function returns the hostname of the operating
system as found by inspection of the guest's
configuration files.
@@ -1400,7 +1400,7 @@ class GuestFS:
return libguestfsmod.inspect_get_hostname (self._o, root)
def inspect_get_format (self, root):
- u"""This returns the format of the inspected operating
+ """This returns the format of the inspected operating
system. You can use it to detect install images, live
CDs and similar.
@@ -1427,7 +1427,7 @@ class GuestFS:
return libguestfsmod.inspect_get_format (self._o, root)
def inspect_is_live (self, root):
- u"""If "g.inspect_get_format" returns "installer" (this is
+ """If "g.inspect_get_format" returns "installer" (this is
an install disk), then this returns true if a live image
was detected on the disk.
@@ -1437,7 +1437,7 @@ class GuestFS:
return libguestfsmod.inspect_is_live (self._o, root)
def inspect_is_netinst (self, root):
- u"""If "g.inspect_get_format" returns "installer" (this is
+ """If "g.inspect_get_format" returns "installer" (this is
an install disk), then this returns true if the disk is
a network installer, ie. not a self-contained install CD
but one which is likely to require network access to
@@ -1449,7 +1449,7 @@ class GuestFS:
return libguestfsmod.inspect_is_netinst (self._o, root)
def inspect_is_multipart (self, root):
- u"""If "g.inspect_get_format" returns "installer" (this is
+ """If "g.inspect_get_format" returns "installer" (this is
an install disk), then this returns true if the disk is
part of a set.
@@ -1459,7 +1459,7 @@ class GuestFS:
return libguestfsmod.inspect_is_multipart (self._o, root)
def set_attach_method (self, attachmethod):
- u"""Set the method that libguestfs uses to connect to the
+ """Set the method that libguestfs uses to connect to the
back end guestfsd daemon. Possible methods are:
"appliance"
@@ -1478,14 +1478,14 @@ class GuestFS:
return libguestfsmod.set_attach_method (self._o, attachmethod)
def get_attach_method (self):
- u"""Return the current attach method. See
+ """Return the current attach method. See
"g.set_attach_method".
"""
self._check_not_closed ()
return libguestfsmod.get_attach_method (self._o)
def inspect_get_product_variant (self, root):
- u"""This returns the product variant of the inspected
+ """This returns the product variant of the inspected
operating system.
For Windows guests, this returns the contents of the
@@ -1513,7 +1513,7 @@ class GuestFS:
return libguestfsmod.inspect_get_product_variant (self._o, root)
def inspect_get_windows_current_control_set (self, root):
- u"""This returns the Windows CurrentControlSet of the
+ """This returns the Windows CurrentControlSet of the
inspected guest. The CurrentControlSet is a registry key
name such as "ControlSet001".
@@ -1527,7 +1527,7 @@ class GuestFS:
return libguestfsmod.inspect_get_windows_current_control_set (self._o, root)
def inspect_get_drive_mappings (self, root):
- u"""This call is useful for Windows which uses a primitive
+ """This call is useful for Windows which uses a primitive
system of assigning drive letters (like "C:") to
partitions. This inspection API examines the Windows
Registry to find out how disks/partitions are mapped to
@@ -1566,7 +1566,7 @@ class GuestFS:
return libguestfsmod.inspect_get_drive_mappings (self._o, root)
def inspect_get_icon (self, root, favicon=-1, highquality=-1):
- u"""This function returns an icon corresponding to the
+ """This function returns an icon corresponding to the
inspected operating system. The icon is returned as a
buffer containing a PNG image (re-encoded to PNG if
necessary).
@@ -1622,7 +1622,7 @@ class GuestFS:
return libguestfsmod.inspect_get_icon (self._o, root, favicon, highquality)
def set_pgroup (self, pgroup):
- u"""If "pgroup" is true, child processes are placed into
+ """If "pgroup" is true, child processes are placed into
their own process group.
The practical upshot of this is that signals like
@@ -1636,13 +1636,13 @@ class GuestFS:
return libguestfsmod.set_pgroup (self._o, pgroup)
def get_pgroup (self):
- u"""This returns the process group flag.
+ """This returns the process group flag.
"""
self._check_not_closed ()
return libguestfsmod.get_pgroup (self._o)
def set_smp (self, smp):
- u"""Change the number of virtual CPUs assigned to the
+ """Change the number of virtual CPUs assigned to the
appliance. The default is 1. Increasing this may improve
performance, though often it has no effect.
@@ -1652,14 +1652,14 @@ class GuestFS:
return libguestfsmod.set_smp (self._o, smp)
def get_smp (self):
- u"""This returns the number of virtual CPUs assigned to the
+ """This returns the number of virtual CPUs assigned to the
appliance.
"""
self._check_not_closed ()
return libguestfsmod.get_smp (self._o)
def mount (self, device, mountpoint):
- u"""Mount a guest disk at a position in the filesystem.
+ """Mount a guest disk at a position in the filesystem.
Block devices are named "/dev/sda", "/dev/sdb" and so
on, as they were added to the guest. If those block
devices contain partitions, they will have the usual
@@ -1686,7 +1686,7 @@ class GuestFS:
return libguestfsmod.mount (self._o, device, mountpoint)
def sync (self):
- u"""This syncs the disk, so that any writes are flushed
+ """This syncs the disk, so that any writes are flushed
through to the underlying disk image.
You should always call this if you have modified a disk
@@ -1696,7 +1696,7 @@ class GuestFS:
return libguestfsmod.sync (self._o)
def touch (self, path):
- u"""Touch acts like the touch(1) command. It can be used to
+ """Touch acts like the touch(1) command. It can be used to
update the timestamps on a file, or, if the file does
not exist, to create a new zero-length file.
@@ -1708,7 +1708,7 @@ class GuestFS:
return libguestfsmod.touch (self._o, path)
def cat (self, path):
- u"""Return the contents of the file named "path".
+ """Return the contents of the file named "path".
Note that this function cannot correctly handle binary
files (specifically, files containing "\\0" character
@@ -1724,7 +1724,7 @@ class GuestFS:
return libguestfsmod.cat (self._o, path)
def ll (self, directory):
- u"""List the files in "directory" (relative to the root
+ """List the files in "directory" (relative to the root
directory, there is no cwd) in the format of 'ls -la'.
This command is mostly useful for interactive sessions.
@@ -1735,7 +1735,7 @@ class GuestFS:
return libguestfsmod.ll (self._o, directory)
def ls (self, directory):
- u"""List the files in "directory" (relative to the root
+ """List the files in "directory" (relative to the root
directory, there is no cwd). The '.' and '..' entries
are not returned, but hidden files are shown.
@@ -1748,7 +1748,7 @@ class GuestFS:
return libguestfsmod.ls (self._o, directory)
def list_devices (self):
- u"""List all the block devices.
+ """List all the block devices.
The full block device names are returned, eg.
"/dev/sda".
@@ -1761,7 +1761,7 @@ class GuestFS:
return libguestfsmod.list_devices (self._o)
def list_partitions (self):
- u"""List all the partitions detected on all block devices.
+ """List all the partitions detected on all block devices.
The full partition device names are returned, eg.
"/dev/sda1"
@@ -1777,7 +1777,7 @@ class GuestFS:
return libguestfsmod.list_partitions (self._o)
def pvs (self):
- u"""List all the physical volumes detected. This is the
+ """List all the physical volumes detected. This is the
equivalent of the pvs(8) command.
This returns a list of just the device names that
@@ -1791,7 +1791,7 @@ class GuestFS:
return libguestfsmod.pvs (self._o)
def vgs (self):
- u"""List all the volumes groups detected. This is the
+ """List all the volumes groups detected. This is the
equivalent of the vgs(8) command.
This returns a list of just the volume group names that
@@ -1805,7 +1805,7 @@ class GuestFS:
return libguestfsmod.vgs (self._o)
def lvs (self):
- u"""List all the logical volumes detected. This is the
+ """List all the logical volumes detected. This is the
equivalent of the lvs(8) command.
This returns a list of the logical volume device names
@@ -1819,7 +1819,7 @@ class GuestFS:
return libguestfsmod.lvs (self._o)
def pvs_full (self):
- u"""List all the physical volumes detected. This is the
+ """List all the physical volumes detected. This is the
equivalent of the pvs(8) command. The "full" version
includes all fields.
@@ -1830,7 +1830,7 @@ class GuestFS:
return libguestfsmod.pvs_full (self._o)
def vgs_full (self):
- u"""List all the volumes groups detected. This is the
+ """List all the volumes groups detected. This is the
equivalent of the vgs(8) command. The "full" version
includes all fields.
@@ -1841,7 +1841,7 @@ class GuestFS:
return libguestfsmod.vgs_full (self._o)
def lvs_full (self):
- u"""List all the logical volumes detected. This is the
+ """List all the logical volumes detected. This is the
equivalent of the lvs(8) command. The "full" version
includes all fields.
@@ -1852,7 +1852,7 @@ class GuestFS:
return libguestfsmod.lvs_full (self._o)
def read_lines (self, path):
- u"""Return the contents of the file named "path".
+ """Return the contents of the file named "path".
The file contents are returned as a list of lines.
Trailing "LF" and "CRLF" character sequences are *not*
@@ -1870,7 +1870,7 @@ class GuestFS:
return libguestfsmod.read_lines (self._o, path)
def aug_init (self, root, flags):
- u"""Create a new Augeas handle for editing configuration
+ """Create a new Augeas handle for editing configuration
files. If there was any previous Augeas handle
associated with this guestfs session, then it is closed.
@@ -1918,7 +1918,7 @@ class GuestFS:
return libguestfsmod.aug_init (self._o, root, flags)
def aug_close (self):
- u"""Close the current Augeas handle and free up any
+ """Close the current Augeas handle and free up any
resources used by it. After calling this, you have to
call "g.aug_init" again before you can use any other
Augeas functions.
@@ -1927,7 +1927,7 @@ class GuestFS:
return libguestfsmod.aug_close (self._o)
def aug_defvar (self, name, expr):
- u"""Defines an Augeas variable "name" whose value is the
+ """Defines an Augeas variable "name" whose value is the
result of evaluating "expr". If "expr" is NULL, then
"name" is undefined.
@@ -1939,7 +1939,7 @@ class GuestFS:
return libguestfsmod.aug_defvar (self._o, name, expr)
def aug_defnode (self, name, expr, val):
- u"""Defines a variable "name" whose value is the result of
+ """Defines a variable "name" whose value is the result of
evaluating "expr".
If "expr" evaluates to an empty nodeset, a node is
@@ -1958,14 +1958,14 @@ class GuestFS:
return libguestfsmod.aug_defnode (self._o, name, expr, val)
def aug_get (self, augpath):
- u"""Look up the value associated with "path". If "path"
+ """Look up the value associated with "path". If "path"
matches exactly one node, the "value" is returned.
"""
self._check_not_closed ()
return libguestfsmod.aug_get (self._o, augpath)
def aug_set (self, augpath, val):
- u"""Set the value associated with "path" to "val".
+ """Set the value associated with "path" to "val".
In the Augeas API, it is possible to clear a node by
setting the value to NULL. Due to an oversight in the
@@ -1976,7 +1976,7 @@ class GuestFS:
return libguestfsmod.aug_set (self._o, augpath, val)
def aug_insert (self, augpath, label, before):
- u"""Create a new sibling "label" for "path", inserting it
+ """Create a new sibling "label" for "path", inserting it
into the tree before or after "path" (depending on the
boolean flag "before").
@@ -1988,7 +1988,7 @@ class GuestFS:
return libguestfsmod.aug_insert (self._o, augpath, label, before)
def aug_rm (self, augpath):
- u"""Remove "path" and all of its children.
+ """Remove "path" and all of its children.
On success this returns the number of entries which were
removed.
@@ -1997,14 +1997,14 @@ class GuestFS:
return libguestfsmod.aug_rm (self._o, augpath)
def aug_mv (self, src, dest):
- u"""Move the node "src" to "dest". "src" must match exactly
+ """Move the node "src" to "dest". "src" must match exactly
one node. "dest" is overwritten if it exists.
"""
self._check_not_closed ()
return libguestfsmod.aug_mv (self._o, src, dest)
def aug_match (self, augpath):
- u"""Returns a list of paths which match the path expression
+ """Returns a list of paths which match the path expression
"path". The returned paths are sufficiently qualified so
that they match exactly one node in the current tree.
@@ -2014,7 +2014,7 @@ class GuestFS:
return libguestfsmod.aug_match (self._o, augpath)
def aug_save (self):
- u"""This writes all pending changes to disk.
+ """This writes all pending changes to disk.
The flags which were passed to "g.aug_init" affect
exactly how files are saved.
@@ -2023,7 +2023,7 @@ class GuestFS:
return libguestfsmod.aug_save (self._o)
def aug_load (self):
- u"""Load files into the tree.
+ """Load files into the tree.
See "aug_load" in the Augeas documentation for the full
gory details.
@@ -2032,7 +2032,7 @@ class GuestFS:
return libguestfsmod.aug_load (self._o)
def aug_ls (self, augpath):
- u"""This is just a shortcut for listing "g.aug_match"
+ """This is just a shortcut for listing "g.aug_match"
"path/*" and sorting the resulting nodes into
alphabetical order.
@@ -2042,19 +2042,19 @@ class GuestFS:
return libguestfsmod.aug_ls (self._o, augpath)
def rm (self, path):
- u"""Remove the single file "path".
+ """Remove the single file "path".
"""
self._check_not_closed ()
return libguestfsmod.rm (self._o, path)
def rmdir (self, path):
- u"""Remove the single directory "path".
+ """Remove the single directory "path".
"""
self._check_not_closed ()
return libguestfsmod.rmdir (self._o, path)
def rm_rf (self, path):
- u"""Remove the file or directory "path", recursively
+ """Remove the file or directory "path", recursively
removing the contents if its a directory. This is like
the "rm -rf" shell command.
"""
@@ -2062,13 +2062,13 @@ class GuestFS:
return libguestfsmod.rm_rf (self._o, path)
def mkdir (self, path):
- u"""Create a directory named "path".
+ """Create a directory named "path".
"""
self._check_not_closed ()
return libguestfsmod.mkdir (self._o, path)
def mkdir_p (self, path):
- u"""Create a directory named "path", creating any parent
+ """Create a directory named "path", creating any parent
directories as necessary. This is like the "mkdir -p"
shell command.
"""
@@ -2076,7 +2076,7 @@ class GuestFS:
return libguestfsmod.mkdir_p (self._o, path)
def chmod (self, mode, path):
- u"""Change the mode (permissions) of "path" to "mode". Only
+ """Change the mode (permissions) of "path" to "mode". Only
numeric modes are supported.
*Note*: When using this command from guestfish, "mode"
@@ -2089,7 +2089,7 @@ class GuestFS:
return libguestfsmod.chmod (self._o, mode, path)
def chown (self, owner, group, path):
- u"""Change the file owner to "owner" and group to "group".
+ """Change the file owner to "owner" and group to "group".
Only numeric uid and gid are supported. If you want to
use names, you will need to locate and parse the
@@ -2100,7 +2100,7 @@ class GuestFS:
return libguestfsmod.chown (self._o, owner, group, path)
def exists (self, path):
- u"""This returns "true" if and only if there is a file,
+ """This returns "true" if and only if there is a file,
directory (or anything) with the given "path" name.
See also "g.is_file", "g.is_dir", "g.stat".
@@ -2109,7 +2109,7 @@ class GuestFS:
return libguestfsmod.exists (self._o, path)
def is_file (self, path):
- u"""This returns "true" if and only if there is a regular
+ """This returns "true" if and only if there is a regular
file with the given "path" name. Note that it returns
false for other objects like directories.
@@ -2119,7 +2119,7 @@ class GuestFS:
return libguestfsmod.is_file (self._o, path)
def is_dir (self, path):
- u"""This returns "true" if and only if there is a directory
+ """This returns "true" if and only if there is a directory
with the given "path" name. Note that it returns false
for other objects like files.
@@ -2129,7 +2129,7 @@ class GuestFS:
return libguestfsmod.is_dir (self._o, path)
def pvcreate (self, device):
- u"""This creates an LVM physical volume on the named
+ """This creates an LVM physical volume on the named
"device", where "device" should usually be a partition
name such as "/dev/sda1".
"""
@@ -2137,7 +2137,7 @@ class GuestFS:
return libguestfsmod.pvcreate (self._o, device)
def vgcreate (self, volgroup, physvols):
- u"""This creates an LVM volume group called "volgroup" from
+ """This creates an LVM volume group called "volgroup" from
the non-empty list of physical volumes "physvols".
"""
physvols = list (physvols)
@@ -2145,14 +2145,14 @@ class GuestFS:
return libguestfsmod.vgcreate (self._o, volgroup, physvols)
def lvcreate (self, logvol, volgroup, mbytes):
- u"""This creates an LVM logical volume called "logvol" on
+ """This creates an LVM logical volume called "logvol" on
the volume group "volgroup", with "size" megabytes.
"""
self._check_not_closed ()
return libguestfsmod.lvcreate (self._o, logvol, volgroup, mbytes)
def mkfs (self, fstype, device):
- u"""This creates a filesystem on "device" (usually a
+ """This creates a filesystem on "device" (usually a
partition or LVM logical volume). The filesystem type is
"fstype", for example "ext3".
"""
@@ -2160,7 +2160,7 @@ class GuestFS:
return libguestfsmod.mkfs (self._o, fstype, device)
def sfdisk (self, device, cyls, heads, sectors, lines):
- u"""This is a direct interface to the sfdisk(8) program for
+ """This is a direct interface to the sfdisk(8) program for
creating partitions on block devices.
"device" should be a block device, for example
@@ -2197,7 +2197,7 @@ class GuestFS:
return libguestfsmod.sfdisk (self._o, device, cyls, heads, sectors, lines)
def write_file (self, path, content, size):
- u"""This call creates a file called "path". The contents of
+ """This call creates a file called "path". The contents of
the file is the string "content" (which can contain any
8 bit data), with length "size".
@@ -2224,7 +2224,7 @@ class GuestFS:
return libguestfsmod.write_file (self._o, path, content, size)
def umount (self, pathordevice):
- u"""This unmounts the given filesystem. The filesystem may
+ """This unmounts the given filesystem. The filesystem may
be specified either by its mountpoint (path) or the
device which contains the filesystem.
"""
@@ -2232,7 +2232,7 @@ class GuestFS:
return libguestfsmod.umount (self._o, pathordevice)
def mounts (self):
- u"""This returns the list of currently mounted filesystems.
+ """This returns the list of currently mounted filesystems.
It returns the list of devices (eg. "/dev/sda1",
"/dev/VG/LV").
@@ -2246,7 +2246,7 @@ class GuestFS:
return libguestfsmod.mounts (self._o)
def umount_all (self):
- u"""This unmounts all mounted filesystems.
+ """This unmounts all mounted filesystems.
Some internal mounts are not unmounted by this call.
"""
@@ -2254,14 +2254,14 @@ class GuestFS:
return libguestfsmod.umount_all (self._o)
def lvm_remove_all (self):
- u"""This command removes all LVM logical volumes, volume
+ """This command removes all LVM logical volumes, volume
groups and physical volumes.
"""
self._check_not_closed ()
return libguestfsmod.lvm_remove_all (self._o)
def file (self, path):
- u"""This call uses the standard file(1) command to determine
+ """This call uses the standard file(1) command to determine
the type or contents of the file.
This call will also transparently look inside various
@@ -2283,7 +2283,7 @@ class GuestFS:
return libguestfsmod.file (self._o, path)
def command (self, arguments):
- u"""This call runs a command from the guest filesystem. The
+ """This call runs a command from the guest filesystem. The
filesystem must be mounted, and must contain a
compatible operating system (ie. something Linux, with
the same or compatible processor architecture).
@@ -2322,7 +2322,7 @@ class GuestFS:
return libguestfsmod.command (self._o, arguments)
def command_lines (self, arguments):
- u"""This is the same as "g.command", but splits the result
+ """This is the same as "g.command", but splits the result
into a list of lines.
See also: "g.sh_lines"
@@ -2338,7 +2338,7 @@ class GuestFS:
return libguestfsmod.command_lines (self._o, arguments)
def stat (self, path):
- u"""Returns file information for the given "path".
+ """Returns file information for the given "path".
This is the same as the stat(2) system call.
@@ -2349,7 +2349,7 @@ class GuestFS:
return libguestfsmod.stat (self._o, path)
def lstat (self, path):
- u"""Returns file information for the given "path".
+ """Returns file information for the given "path".
This is the same as "g.stat" except that if "path" is a
symbolic link, then the link is stat-ed, not the file it
@@ -2364,7 +2364,7 @@ class GuestFS:
return libguestfsmod.lstat (self._o, path)
def statvfs (self, path):
- u"""Returns file system statistics for any mounted file
+ """Returns file system statistics for any mounted file
system. "path" should be a file or directory in the
mounted file system (typically it is the mount point
itself, but it doesn't need to be).
@@ -2378,7 +2378,7 @@ class GuestFS:
return libguestfsmod.statvfs (self._o, path)
def tune2fs_l (self, device):
- u"""This returns the contents of the ext2, ext3 or ext4
+ """This returns the contents of the ext2, ext3 or ext4
filesystem superblock on "device".
It is the same as running "tune2fs -l device". See
@@ -2393,7 +2393,7 @@ class GuestFS:
return libguestfsmod.tune2fs_l (self._o, device)
def blockdev_setro (self, device):
- u"""Sets the block device named "device" to read-only.
+ """Sets the block device named "device" to read-only.
This uses the blockdev(8) command.
"""
@@ -2401,7 +2401,7 @@ class GuestFS:
return libguestfsmod.blockdev_setro (self._o, device)
def blockdev_setrw (self, device):
- u"""Sets the block device named "device" to read-write.
+ """Sets the block device named "device" to read-write.
This uses the blockdev(8) command.
"""
@@ -2409,7 +2409,7 @@ class GuestFS:
return libguestfsmod.blockdev_setrw (self._o, device)
def blockdev_getro (self, device):
- u"""Returns a boolean indicating if the block device is
+ """Returns a boolean indicating if the block device is
read-only (true if read-only, false if not).
This uses the blockdev(8) command.
@@ -2418,7 +2418,7 @@ class GuestFS:
return libguestfsmod.blockdev_getro (self._o, device)
def blockdev_getss (self, device):
- u"""This returns the size of sectors on a block device.
+ """This returns the size of sectors on a block device.
Usually 512, but can be larger for modern devices.
(Note, this is not the size in sectors, use
@@ -2430,7 +2430,7 @@ class GuestFS:
return libguestfsmod.blockdev_getss (self._o, device)
def blockdev_getbsz (self, device):
- u"""This returns the block size of a device.
+ """This returns the block size of a device.
(Note this is different from both *size in blocks* and
*filesystem block size*).
@@ -2441,7 +2441,7 @@ class GuestFS:
return libguestfsmod.blockdev_getbsz (self._o, device)
def blockdev_setbsz (self, device, blocksize):
- u"""This sets the block size of a device.
+ """This sets the block size of a device.
(Note this is different from both *size in blocks* and
*filesystem block size*).
@@ -2452,7 +2452,7 @@ class GuestFS:
return libguestfsmod.blockdev_setbsz (self._o, device, blocksize)
def blockdev_getsz (self, device):
- u"""This returns the size of the device in units of 512-byte
+ """This returns the size of the device in units of 512-byte
sectors (even if the sectorsize isn't 512 bytes ...
weird).
@@ -2466,7 +2466,7 @@ class GuestFS:
return libguestfsmod.blockdev_getsz (self._o, device)
def blockdev_getsize64 (self, device):
- u"""This returns the size of the device in bytes.
+ """This returns the size of the device in bytes.
See also "g.blockdev_getsz".
@@ -2476,7 +2476,7 @@ class GuestFS:
return libguestfsmod.blockdev_getsize64 (self._o, device)
def blockdev_flushbufs (self, device):
- u"""This tells the kernel to flush internal buffers
+ """This tells the kernel to flush internal buffers
associated with "device".
This uses the blockdev(8) command.
@@ -2485,7 +2485,7 @@ class GuestFS:
return libguestfsmod.blockdev_flushbufs (self._o, device)
def blockdev_rereadpt (self, device):
- u"""Reread the partition table on "device".
+ """Reread the partition table on "device".
This uses the blockdev(8) command.
"""
@@ -2493,7 +2493,7 @@ class GuestFS:
return libguestfsmod.blockdev_rereadpt (self._o, device)
def upload (self, filename, remotefilename):
- u"""Upload local file "filename" to "remotefilename" on the
+ """Upload local file "filename" to "remotefilename" on the
filesystem.
"filename" can also be a named pipe.
@@ -2504,7 +2504,7 @@ class GuestFS:
return libguestfsmod.upload (self._o, filename, remotefilename)
def download (self, remotefilename, filename):
- u"""Download file "remotefilename" and save it as "filename"
+ """Download file "remotefilename" and save it as "filename"
on the local machine.
"filename" can also be a named pipe.
@@ -2515,7 +2515,7 @@ class GuestFS:
return libguestfsmod.download (self._o, remotefilename, filename)
def checksum (self, csumtype, path):
- u"""This call computes the MD5, SHAx or CRC checksum of the
+ """This call computes the MD5, SHAx or CRC checksum of the
file named "path".
The type of checksum to compute is given by the
@@ -2560,7 +2560,7 @@ class GuestFS:
return libguestfsmod.checksum (self._o, csumtype, path)
def tar_in (self, tarfile, directory):
- u"""This command uploads and unpacks local file "tarfile"
+ """This command uploads and unpacks local file "tarfile"
(an *uncompressed* tar file) into "directory".
To upload a compressed tarball, use "g.tgz_in" or
@@ -2570,7 +2570,7 @@ class GuestFS:
return libguestfsmod.tar_in (self._o, tarfile, directory)
def tar_out (self, directory, tarfile):
- u"""This command packs the contents of "directory" and
+ """This command packs the contents of "directory" and
downloads it to local file "tarfile".
To download a compressed tarball, use "g.tgz_out" or
@@ -2580,7 +2580,7 @@ class GuestFS:
return libguestfsmod.tar_out (self._o, directory, tarfile)
def tgz_in (self, tarball, directory):
- u"""This command uploads and unpacks local file "tarball" (a
+ """This command uploads and unpacks local file "tarball" (a
*gzip compressed* tar file) into "directory".
To upload an uncompressed tarball, use "g.tar_in".
@@ -2589,7 +2589,7 @@ class GuestFS:
return libguestfsmod.tgz_in (self._o, tarball, directory)
def tgz_out (self, directory, tarball):
- u"""This command packs the contents of "directory" and
+ """This command packs the contents of "directory" and
downloads it to local file "tarball".
To download an uncompressed tarball, use "g.tar_out".
@@ -2598,14 +2598,14 @@ class GuestFS:
return libguestfsmod.tgz_out (self._o, directory, tarball)
def mount_ro (self, device, mountpoint):
- u"""This is the same as the "g.mount" command, but it mounts
+ """This is the same as the "g.mount" command, but it mounts
the filesystem with the read-only (*-o ro*) flag.
"""
self._check_not_closed ()
return libguestfsmod.mount_ro (self._o, device, mountpoint)
def mount_options (self, options, device, mountpoint):
- u"""This is the same as the "g.mount" command, but it allows
+ """This is the same as the "g.mount" command, but it allows
you to set the mount options as for the mount(8) *-o*
flag.
@@ -2617,7 +2617,7 @@ class GuestFS:
return libguestfsmod.mount_options (self._o, options, device, mountpoint)
def mount_vfs (self, options, vfstype, device, mountpoint):
- u"""This is the same as the "g.mount" command, but it allows
+ """This is the same as the "g.mount" command, but it allows
you to set both the mount options and the vfstype as for
the mount(8) *-o* and *-t* flags.
"""
@@ -2630,7 +2630,7 @@ class GuestFS:
return libguestfsmod.debug (self._o, subcmd, extraargs)
def lvremove (self, device):
- u"""Remove an LVM logical volume "device", where "device" is
+ """Remove an LVM logical volume "device", where "device" is
the path to the LV, such as "/dev/VG/LV".
You can also remove all LVs in a volume group by
@@ -2640,7 +2640,7 @@ class GuestFS:
return libguestfsmod.lvremove (self._o, device)
def vgremove (self, vgname):
- u"""Remove an LVM volume group "vgname", (for example "VG").
+ """Remove an LVM volume group "vgname", (for example "VG").
This also forcibly removes all logical volumes in the
volume group (if any).
@@ -2649,7 +2649,7 @@ class GuestFS:
return libguestfsmod.vgremove (self._o, vgname)
def pvremove (self, device):
- u"""This wipes a physical volume "device" so that LVM will
+ """This wipes a physical volume "device" so that LVM will
no longer recognise it.
The implementation uses the "pvremove" command which
@@ -2660,7 +2660,7 @@ class GuestFS:
return libguestfsmod.pvremove (self._o, device)
def set_e2label (self, device, label):
- u"""This sets the ext2/3/4 filesystem label of the
+ """This sets the ext2/3/4 filesystem label of the
filesystem on "device" to "label". Filesystem labels are
limited to 16 characters.
@@ -2671,7 +2671,7 @@ class GuestFS:
return libguestfsmod.set_e2label (self._o, device, label)
def get_e2label (self, device):
- u"""This returns the ext2/3/4 filesystem label of the
+ """This returns the ext2/3/4 filesystem label of the
filesystem on "device".
*This function is deprecated.* In new code, use the
@@ -2685,7 +2685,7 @@ class GuestFS:
return libguestfsmod.get_e2label (self._o, device)
def set_e2uuid (self, device, uuid):
- u"""This sets the ext2/3/4 filesystem UUID of the filesystem
+ """This sets the ext2/3/4 filesystem UUID of the filesystem
on "device" to "uuid". The format of the UUID and
alternatives such as "clear", "random" and "time" are
described in the tune2fs(8) manpage.
@@ -2697,7 +2697,7 @@ class GuestFS:
return libguestfsmod.set_e2uuid (self._o, device, uuid)
def get_e2uuid (self, device):
- u"""This returns the ext2/3/4 filesystem UUID of the
+ """This returns the ext2/3/4 filesystem UUID of the
filesystem on "device".
*This function is deprecated.* In new code, use the
@@ -2711,7 +2711,7 @@ class GuestFS:
return libguestfsmod.get_e2uuid (self._o, device)
def fsck (self, fstype, device):
- u"""This runs the filesystem checker (fsck) on "device"
+ """This runs the filesystem checker (fsck) on "device"
which should have filesystem type "fstype".
The returned integer is the status. See fsck(8) for the
@@ -2735,7 +2735,7 @@ class GuestFS:
return libguestfsmod.fsck (self._o, fstype, device)
def zero (self, device):
- u"""This command writes zeroes over the first few blocks of
+ """This command writes zeroes over the first few blocks of
"device".
How many blocks are zeroed isn't specified (but it's
@@ -2754,7 +2754,7 @@ class GuestFS:
return libguestfsmod.zero (self._o, device)
def grub_install (self, root, device):
- u"""This command installs GRUB 1 (the Grand Unified
+ """This command installs GRUB 1 (the Grand Unified
Bootloader) on "device", with the root directory being
"root".
@@ -2788,28 +2788,28 @@ class GuestFS:
return libguestfsmod.grub_install (self._o, root, device)
def cp (self, src, dest):
- u"""This copies a file from "src" to "dest" where "dest" is
+ """This copies a file from "src" to "dest" where "dest" is
either a destination filename or destination directory.
"""
self._check_not_closed ()
return libguestfsmod.cp (self._o, src, dest)
def cp_a (self, src, dest):
- u"""This copies a file or directory from "src" to "dest"
+ """This copies a file or directory from "src" to "dest"
recursively using the "cp -a" command.
"""
self._check_not_closed ()
return libguestfsmod.cp_a (self._o, src, dest)
def mv (self, src, dest):
- u"""This moves a file from "src" to "dest" where "dest" is
+ """This moves a file from "src" to "dest" where "dest" is
either a destination filename or destination directory.
"""
self._check_not_closed ()
return libguestfsmod.mv (self._o, src, dest)
def drop_caches (self, whattodrop):
- u"""This instructs the guest kernel to drop its page cache,
+ """This instructs the guest kernel to drop its page cache,
and/or dentries and inode caches. The parameter
"whattodrop" tells the kernel what precisely to drop,
see <http://linux-mm.org/Drop_Caches>
@@ -2823,7 +2823,7 @@ class GuestFS:
return libguestfsmod.drop_caches (self._o, whattodrop)
def dmesg (self):
- u"""This returns the kernel messages ("dmesg" output) from
+ """This returns the kernel messages ("dmesg" output) from
the guest kernel. This is sometimes useful for extended
debugging of problems.
@@ -2836,7 +2836,7 @@ class GuestFS:
return libguestfsmod.dmesg (self._o)
def ping_daemon (self):
- u"""This is a test probe into the guestfs daemon running
+ """This is a test probe into the guestfs daemon running
inside the qemu subprocess. Calling this function checks
that the daemon responds to the ping message, without
affecting the daemon or attached block device(s) in any
@@ -2846,7 +2846,7 @@ class GuestFS:
return libguestfsmod.ping_daemon (self._o)
def equal (self, file1, file2):
- u"""This compares the two files "file1" and "file2" and
+ """This compares the two files "file1" and "file2" and
returns true if their content is exactly equal, or false
otherwise.
@@ -2856,7 +2856,7 @@ class GuestFS:
return libguestfsmod.equal (self._o, file1, file2)
def strings (self, path):
- u"""This runs the strings(1) command on a file and returns
+ """This runs the strings(1) command on a file and returns
the list of printable strings found.
This function returns a list of strings.
@@ -2869,7 +2869,7 @@ class GuestFS:
return libguestfsmod.strings (self._o, path)
def strings_e (self, encoding, path):
- u"""This is like the "g.strings" command, but allows you to
+ """This is like the "g.strings" command, but allows you to
specify the encoding of strings that are looked for in
the source file "path".
@@ -2905,7 +2905,7 @@ class GuestFS:
return libguestfsmod.strings_e (self._o, encoding, path)
def hexdump (self, path):
- u"""This runs "hexdump -C" on the given "path". The result
+ """This runs "hexdump -C" on the given "path". The result
is the human-readable, canonical hex dump of the file.
Because of the message protocol, there is a transfer
@@ -2916,7 +2916,7 @@ class GuestFS:
return libguestfsmod.hexdump (self._o, path)
def zerofree (self, device):
- u"""This runs the *zerofree* program on "device". This
+ """This runs the *zerofree* program on "device". This
program claims to zero unused inodes and disk blocks on
an ext2/3 filesystem, thus making it possible to
compress the filesystem more effectively.
@@ -2931,7 +2931,7 @@ class GuestFS:
return libguestfsmod.zerofree (self._o, device)
def pvresize (self, device):
- u"""This resizes (expands or shrinks) an existing LVM
+ """This resizes (expands or shrinks) an existing LVM
physical volume to match the new size of the underlying
device.
"""
@@ -2939,7 +2939,7 @@ class GuestFS:
return libguestfsmod.pvresize (self._o, device)
def sfdisk_N (self, device, partnum, cyls, heads, sectors, line):
- u"""This runs sfdisk(8) option to modify just the single
+ """This runs sfdisk(8) option to modify just the single
partition "n" (note: "n" counts from 1).
For other parameters, see "g.sfdisk". You should usually
@@ -2958,7 +2958,7 @@ class GuestFS:
return libguestfsmod.sfdisk_N (self._o, device, partnum, cyls, heads, sectors, line)
def sfdisk_l (self, device):
- u"""This displays the partition table on "device", in the
+ """This displays the partition table on "device", in the
human-readable output of the sfdisk(8) command. It is
not intended to be parsed.
@@ -2975,7 +2975,7 @@ class GuestFS:
return libguestfsmod.sfdisk_l (self._o, device)
def sfdisk_kernel_geometry (self, device):
- u"""This displays the kernel's idea of the geometry of
+ """This displays the kernel's idea of the geometry of
"device".
The result is in human-readable format, and not designed
@@ -2985,7 +2985,7 @@ class GuestFS:
return libguestfsmod.sfdisk_kernel_geometry (self._o, device)
def sfdisk_disk_geometry (self, device):
- u"""This displays the disk geometry of "device" read from
+ """This displays the disk geometry of "device" read from
the partition table. Especially in the case where the
underlying block device has been resized, this can be
different from the kernel's idea of the geometry (see
@@ -2998,7 +2998,7 @@ class GuestFS:
return libguestfsmod.sfdisk_disk_geometry (self._o, device)
def vg_activate_all (self, activate):
- u"""This command activates or (if "activate" is false)
+ """This command activates or (if "activate" is false)
deactivates all logical volumes in all volume groups.
This command is the same as running "vgchange -a y|n"
@@ -3007,7 +3007,7 @@ class GuestFS:
return libguestfsmod.vg_activate_all (self._o, activate)
def vg_activate (self, activate, volgroups):
- u"""This command activates or (if "activate" is false)
+ """This command activates or (if "activate" is false)
deactivates all logical volumes in the listed volume
groups "volgroups".
@@ -3022,7 +3022,7 @@ class GuestFS:
return libguestfsmod.vg_activate (self._o, activate, volgroups)
def lvresize (self, device, mbytes):
- u"""This resizes (expands or shrinks) an existing LVM
+ """This resizes (expands or shrinks) an existing LVM
logical volume to "mbytes". When reducing, data in the
reduced part is lost.
"""
@@ -3030,7 +3030,7 @@ class GuestFS:
return libguestfsmod.lvresize (self._o, device, mbytes)
def resize2fs (self, device):
- u"""This resizes an ext2, ext3 or ext4 filesystem to match
+ """This resizes an ext2, ext3 or ext4 filesystem to match
the size of the underlying device.
*Note:* It is sometimes required that you run
@@ -3044,7 +3044,7 @@ class GuestFS:
return libguestfsmod.resize2fs (self._o, device)
def find (self, directory):
- u"""This command lists out all files and directories,
+ """This command lists out all files and directories,
recursively, starting at "directory". It is essentially
equivalent to running the shell command "find directory
-print" but some post-processing happens on the output,
@@ -3082,7 +3082,7 @@ class GuestFS:
return libguestfsmod.find (self._o, directory)
def e2fsck_f (self, device):
- u"""This runs "e2fsck -p -f device", ie. runs the ext2/ext3
+ """This runs "e2fsck -p -f device", ie. runs the ext2/ext3
filesystem checker on "device", noninteractively (*-p*),
even if the filesystem appears to be clean (*-f*).
@@ -3093,13 +3093,13 @@ class GuestFS:
return libguestfsmod.e2fsck_f (self._o, device)
def sleep (self, secs):
- u"""Sleep for "secs" seconds.
+ """Sleep for "secs" seconds.
"""
self._check_not_closed ()
return libguestfsmod.sleep (self._o, secs)
def ntfs_3g_probe (self, rw, device):
- u"""This command runs the ntfs-3g.probe(8) command which
+ """This command runs the ntfs-3g.probe(8) command which
probes an NTFS "device" for mountability. (Not all NTFS
volumes can be mounted read-write, and some cannot be
mounted at all).
@@ -3117,7 +3117,7 @@ class GuestFS:
return libguestfsmod.ntfs_3g_probe (self._o, rw, device)
def sh (self, command):
- u"""This call runs a command from the guest filesystem via
+ """This call runs a command from the guest filesystem via
the guest's "/bin/sh".
This is like "g.command", but passes the command to:
@@ -3134,7 +3134,7 @@ class GuestFS:
return libguestfsmod.sh (self._o, command)
def sh_lines (self, command):
- u"""This is the same as "g.sh", but splits the result into a
+ """This is the same as "g.sh", but splits the result into a
list of lines.
See also: "g.command_lines"
@@ -3145,7 +3145,7 @@ class GuestFS:
return libguestfsmod.sh_lines (self._o, command)
def glob_expand (self, pattern):
- u"""This command searches for all the pathnames matching
+ """This command searches for all the pathnames matching
"pattern" according to the wildcard expansion rules used
by the shell.
@@ -3162,7 +3162,7 @@ class GuestFS:
return libguestfsmod.glob_expand (self._o, pattern)
def scrub_device (self, device):
- u"""This command writes patterns over "device" to make data
+ """This command writes patterns over "device" to make data
retrieval more difficult.
It is an interface to the scrub(1) program. See that
@@ -3172,7 +3172,7 @@ class GuestFS:
return libguestfsmod.scrub_device (self._o, device)
def scrub_file (self, file):
- u"""This command writes patterns over a file to make data
+ """This command writes patterns over a file to make data
retrieval more difficult.
The file is *removed* after scrubbing.
@@ -3184,7 +3184,7 @@ class GuestFS:
return libguestfsmod.scrub_file (self._o, file)
def scrub_freespace (self, dir):
- u"""This command creates the directory "dir" and then fills
+ """This command creates the directory "dir" and then fills
it with files until the filesystem is full, and scrubs
the files as for "g.scrub_file", and deletes them. The
intention is to scrub any free space on the partition
@@ -3197,7 +3197,7 @@ class GuestFS:
return libguestfsmod.scrub_freespace (self._o, dir)
def mkdtemp (self, template):
- u"""This command creates a temporary directory. The
+ """This command creates a temporary directory. The
"template" parameter should be a full pathname for the
temporary directory name with the final six characters
being "XXXXXX".
@@ -3221,28 +3221,28 @@ class GuestFS:
return libguestfsmod.mkdtemp (self._o, template)
def wc_l (self, path):
- u"""This command counts the lines in a file, using the "wc
+ """This command counts the lines in a file, using the "wc
-l" external command.
"""
self._check_not_closed ()
return libguestfsmod.wc_l (self._o, path)
def wc_w (self, path):
- u"""This command counts the words in a file, using the "wc
+ """This command counts the words in a file, using the "wc
-w" external command.
"""
self._check_not_closed ()
return libguestfsmod.wc_w (self._o, path)
def wc_c (self, path):
- u"""This command counts the characters in a file, using the
+ """This command counts the characters in a file, using the
"wc -c" external command.
"""
self._check_not_closed ()
return libguestfsmod.wc_c (self._o, path)
def head (self, path):
- u"""This command returns up to the first 10 lines of a file
+ """This command returns up to the first 10 lines of a file
as a list of strings.
This function returns a list of strings.
@@ -3255,7 +3255,7 @@ class GuestFS:
return libguestfsmod.head (self._o, path)
def head_n (self, nrlines, path):
- u"""If the parameter "nrlines" is a positive number, this
+ """If the parameter "nrlines" is a positive number, this
returns the first "nrlines" lines of the file "path".
If the parameter "nrlines" is a negative number, this
@@ -3275,7 +3275,7 @@ class GuestFS:
return libguestfsmod.head_n (self._o, nrlines, path)
def tail (self, path):
- u"""This command returns up to the last 10 lines of a file
+ """This command returns up to the last 10 lines of a file
as a list of strings.
This function returns a list of strings.
@@ -3288,7 +3288,7 @@ class GuestFS:
return libguestfsmod.tail (self._o, path)
def tail_n (self, nrlines, path):
- u"""If the parameter "nrlines" is a positive number, this
+ """If the parameter "nrlines" is a positive number, this
returns the last "nrlines" lines of the file "path".
If the parameter "nrlines" is a negative number, this
@@ -3308,7 +3308,7 @@ class GuestFS:
return libguestfsmod.tail_n (self._o, nrlines, path)
def df (self):
- u"""This command runs the "df" command to report disk space
+ """This command runs the "df" command to report disk space
used.
This command is mostly useful for interactive sessions.
@@ -3319,7 +3319,7 @@ class GuestFS:
return libguestfsmod.df (self._o)
def df_h (self):
- u"""This command runs the "df -h" command to report disk
+ """This command runs the "df -h" command to report disk
space used in human-readable format.
This command is mostly useful for interactive sessions.
@@ -3330,7 +3330,7 @@ class GuestFS:
return libguestfsmod.df_h (self._o)
def du (self, path):
- u"""This command runs the "du -s" command to estimate file
+ """This command runs the "du -s" command to estimate file
space usage for "path".
"path" can be a file or a directory. If "path" is a
@@ -3344,7 +3344,7 @@ class GuestFS:
return libguestfsmod.du (self._o, path)
def initrd_list (self, path):
- u"""This command lists out files contained in an initrd.
+ """This command lists out files contained in an initrd.
The files are listed without any initial "/" character.
The files are listed in the order they appear (not
@@ -3361,7 +3361,7 @@ class GuestFS:
return libguestfsmod.initrd_list (self._o, path)
def mount_loop (self, file, mountpoint):
- u"""This command lets you mount "file" (a filesystem image
+ """This command lets you mount "file" (a filesystem image
in a file) on a mount point. It is entirely equivalent
to the command "mount -o loop file mountpoint".
"""
@@ -3369,13 +3369,13 @@ class GuestFS:
return libguestfsmod.mount_loop (self._o, file, mountpoint)
def mkswap (self, device):
- u"""Create a swap partition on "device".
+ """Create a swap partition on "device".
"""
self._check_not_closed ()
return libguestfsmod.mkswap (self._o, device)
def mkswap_L (self, label, device):
- u"""Create a swap partition on "device" with label "label".
+ """Create a swap partition on "device" with label "label".
Note that you cannot attach a swap label to a block
device (eg. "/dev/sda"), just to a partition. This
@@ -3385,13 +3385,13 @@ class GuestFS:
return libguestfsmod.mkswap_L (self._o, label, device)
def mkswap_U (self, uuid, device):
- u"""Create a swap partition on "device" with UUID "uuid".
+ """Create a swap partition on "device" with UUID "uuid".
"""
self._check_not_closed ()
return libguestfsmod.mkswap_U (self._o, uuid, device)
def mknod (self, mode, devmajor, devminor, path):
- u"""This call creates block or character special devices, or
+ """This call creates block or character special devices, or
named pipes (FIFOs).
The "mode" parameter should be the mode, using the
@@ -3413,7 +3413,7 @@ class GuestFS:
return libguestfsmod.mknod (self._o, mode, devmajor, devminor, path)
def mkfifo (self, mode, path):
- u"""This call creates a FIFO (named pipe) called "path" with
+ """This call creates a FIFO (named pipe) called "path" with
mode "mode". It is just a convenient wrapper around
"g.mknod".
@@ -3423,7 +3423,7 @@ class GuestFS:
return libguestfsmod.mkfifo (self._o, mode, path)
def mknod_b (self, mode, devmajor, devminor, path):
- u"""This call creates a block device node called "path" with
+ """This call creates a block device node called "path" with
mode "mode" and device major/minor "devmajor" and
"devminor". It is just a convenient wrapper around
"g.mknod".
@@ -3434,7 +3434,7 @@ class GuestFS:
return libguestfsmod.mknod_b (self._o, mode, devmajor, devminor, path)
def mknod_c (self, mode, devmajor, devminor, path):
- u"""This call creates a char device node called "path" with
+ """This call creates a char device node called "path" with
mode "mode" and device major/minor "devmajor" and
"devminor". It is just a convenient wrapper around
"g.mknod".
@@ -3445,7 +3445,7 @@ class GuestFS:
return libguestfsmod.mknod_c (self._o, mode, devmajor, devminor, path)
def umask (self, mask):
- u"""This function sets the mask used for creating new files
+ """This function sets the mask used for creating new files
and device nodes to "mask & 0777".
Typical umask values would be 022 which creates new
@@ -3465,7 +3465,7 @@ class GuestFS:
return libguestfsmod.umask (self._o, mask)
def readdir (self, dir):
- u"""This returns the list of directory entries in directory
+ """This returns the list of directory entries in directory
"dir".
All entries in the directory are returned, including "."
@@ -3506,7 +3506,7 @@ class GuestFS:
return libguestfsmod.readdir (self._o, dir)
def sfdiskM (self, device, lines):
- u"""This is a simplified interface to the "g.sfdisk"
+ """This is a simplified interface to the "g.sfdisk"
command, where partition sizes are specified in
megabytes only (rounded to the nearest cylinder) and you
don't need to specify the cyls, heads and sectors
@@ -3527,7 +3527,7 @@ class GuestFS:
return libguestfsmod.sfdiskM (self._o, device, lines)
def zfile (self, meth, path):
- u"""This command runs "file" after first decompressing
+ """This command runs "file" after first decompressing
"path" using "method".
"method" must be one of "gzip", "compress" or "bzip2".
@@ -3546,7 +3546,7 @@ class GuestFS:
return libguestfsmod.zfile (self._o, meth, path)
def getxattrs (self, path):
- u"""This call lists the extended attributes of the file or
+ """This call lists the extended attributes of the file or
directory "path".
At the system call level, this is a combination of the
@@ -3561,7 +3561,7 @@ class GuestFS:
return libguestfsmod.getxattrs (self._o, path)
def lgetxattrs (self, path):
- u"""This is the same as "g.getxattrs", but if "path" is a
+ """This is the same as "g.getxattrs", but if "path" is a
symbolic link, then it returns the extended attributes
of the link itself.
@@ -3572,7 +3572,7 @@ class GuestFS:
return libguestfsmod.lgetxattrs (self._o, path)
def setxattr (self, xattr, val, vallen, path):
- u"""This call sets the extended attribute named "xattr" of
+ """This call sets the extended attribute named "xattr" of
the file "path" to the value "val" (of length "vallen").
The value is arbitrary 8 bit data.
@@ -3582,7 +3582,7 @@ class GuestFS:
return libguestfsmod.setxattr (self._o, xattr, val, vallen, path)
def lsetxattr (self, xattr, val, vallen, path):
- u"""This is the same as "g.setxattr", but if "path" is a
+ """This is the same as "g.setxattr", but if "path" is a
symbolic link, then it sets an extended attribute of the
link itself.
"""
@@ -3590,7 +3590,7 @@ class GuestFS:
return libguestfsmod.lsetxattr (self._o, xattr, val, vallen, path)
def removexattr (self, xattr, path):
- u"""This call removes the extended attribute named "xattr"
+ """This call removes the extended attribute named "xattr"
of the file "path".
See also: "g.lremovexattr", attr(5).
@@ -3599,7 +3599,7 @@ class GuestFS:
return libguestfsmod.removexattr (self._o, xattr, path)
def lremovexattr (self, xattr, path):
- u"""This is the same as "g.removexattr", but if "path" is a
+ """This is the same as "g.removexattr", but if "path" is a
symbolic link, then it removes an extended attribute of
the link itself.
"""
@@ -3607,7 +3607,7 @@ class GuestFS:
return libguestfsmod.lremovexattr (self._o, xattr, path)
def mountpoints (self):
- u"""This call is similar to "g.mounts". That call returns a
+ """This call is similar to "g.mounts". That call returns a
list of devices. This one returns a hash table (map) of
device name to directory where the device is mounted.
@@ -3617,7 +3617,7 @@ class GuestFS:
return libguestfsmod.mountpoints (self._o)
def mkmountpoint (self, exemptpath):
- u""""g.mkmountpoint" and "g.rmmountpoint" are specialized
+ """"g.mkmountpoint" and "g.rmmountpoint" are specialized
calls that can be used to create extra mountpoints
before mounting the first filesystem.
@@ -3665,7 +3665,7 @@ class GuestFS:
return libguestfsmod.mkmountpoint (self._o, exemptpath)
def rmmountpoint (self, exemptpath):
- u"""This calls removes a mountpoint that was previously
+ """This calls removes a mountpoint that was previously
created with "g.mkmountpoint". See "g.mkmountpoint" for
full details.
"""
@@ -3673,7 +3673,7 @@ class GuestFS:
return libguestfsmod.rmmountpoint (self._o, exemptpath)
def read_file (self, path):
- u"""This calls returns the contents of the file "path" as a
+ """This calls returns the contents of the file "path" as a
buffer.
Unlike "g.cat", this function can correctly handle files
@@ -3689,7 +3689,7 @@ class GuestFS:
return libguestfsmod.read_file (self._o, path)
def grep (self, regex, path):
- u"""This calls the external "grep" program and returns the
+ """This calls the external "grep" program and returns the
matching lines.
This function returns a list of strings.
@@ -3702,7 +3702,7 @@ class GuestFS:
return libguestfsmod.grep (self._o, regex, path)
def egrep (self, regex, path):
- u"""This calls the external "egrep" program and returns the
+ """This calls the external "egrep" program and returns the
matching lines.
This function returns a list of strings.
@@ -3715,7 +3715,7 @@ class GuestFS:
return libguestfsmod.egrep (self._o, regex, path)
def fgrep (self, pattern, path):
- u"""This calls the external "fgrep" program and returns the
+ """This calls the external "fgrep" program and returns the
matching lines.
This function returns a list of strings.
@@ -3728,7 +3728,7 @@ class GuestFS:
return libguestfsmod.fgrep (self._o, pattern, path)
def grepi (self, regex, path):
- u"""This calls the external "grep -i" program and returns
+ """This calls the external "grep -i" program and returns
the matching lines.
This function returns a list of strings.
@@ -3741,7 +3741,7 @@ class GuestFS:
return libguestfsmod.grepi (self._o, regex, path)
def egrepi (self, regex, path):
- u"""This calls the external "egrep -i" program and returns
+ """This calls the external "egrep -i" program and returns
the matching lines.
This function returns a list of strings.
@@ -3754,7 +3754,7 @@ class GuestFS:
return libguestfsmod.egrepi (self._o, regex, path)
def fgrepi (self, pattern, path):
- u"""This calls the external "fgrep -i" program and returns
+ """This calls the external "fgrep -i" program and returns
the matching lines.
This function returns a list of strings.
@@ -3767,7 +3767,7 @@ class GuestFS:
return libguestfsmod.fgrepi (self._o, pattern, path)
def zgrep (self, regex, path):
- u"""This calls the external "zgrep" program and returns the
+ """This calls the external "zgrep" program and returns the
matching lines.
This function returns a list of strings.
@@ -3780,7 +3780,7 @@ class GuestFS:
return libguestfsmod.zgrep (self._o, regex, path)
def zegrep (self, regex, path):
- u"""This calls the external "zegrep" program and returns the
+ """This calls the external "zegrep" program and returns the
matching lines.
This function returns a list of strings.
@@ -3793,7 +3793,7 @@ class GuestFS:
return libguestfsmod.zegrep (self._o, regex, path)
def zfgrep (self, pattern, path):
- u"""This calls the external "zfgrep" program and returns the
+ """This calls the external "zfgrep" program and returns the
matching lines.
This function returns a list of strings.
@@ -3806,7 +3806,7 @@ class GuestFS:
return libguestfsmod.zfgrep (self._o, pattern, path)
def zgrepi (self, regex, path):
- u"""This calls the external "zgrep -i" program and returns
+ """This calls the external "zgrep -i" program and returns
the matching lines.
This function returns a list of strings.
@@ -3819,7 +3819,7 @@ class GuestFS:
return libguestfsmod.zgrepi (self._o, regex, path)
def zegrepi (self, regex, path):
- u"""This calls the external "zegrep -i" program and returns
+ """This calls the external "zegrep -i" program and returns
the matching lines.
This function returns a list of strings.
@@ -3832,7 +3832,7 @@ class GuestFS:
return libguestfsmod.zegrepi (self._o, regex, path)
def zfgrepi (self, pattern, path):
- u"""This calls the external "zfgrep -i" program and returns
+ """This calls the external "zfgrep -i" program and returns
the matching lines.
This function returns a list of strings.
@@ -3845,7 +3845,7 @@ class GuestFS:
return libguestfsmod.zfgrepi (self._o, pattern, path)
def realpath (self, path):
- u"""Return the canonicalized absolute pathname of "path".
+ """Return the canonicalized absolute pathname of "path".
The returned path has no ".", ".." or symbolic link path
elements.
"""
@@ -3853,13 +3853,13 @@ class GuestFS:
return libguestfsmod.realpath (self._o, path)
def ln (self, target, linkname):
- u"""This command creates a hard link using the "ln" command.
+ """This command creates a hard link using the "ln" command.
"""
self._check_not_closed ()
return libguestfsmod.ln (self._o, target, linkname)
def ln_f (self, target, linkname):
- u"""This command creates a hard link using the "ln -f"
+ """This command creates a hard link using the "ln -f"
command. The *-f* option removes the link ("linkname")
if it exists already.
"""
@@ -3867,14 +3867,14 @@ class GuestFS:
return libguestfsmod.ln_f (self._o, target, linkname)
def ln_s (self, target, linkname):
- u"""This command creates a symbolic link using the "ln -s"
+ """This command creates a symbolic link using the "ln -s"
command.
"""
self._check_not_closed ()
return libguestfsmod.ln_s (self._o, target, linkname)
def ln_sf (self, target, linkname):
- u"""This command creates a symbolic link using the "ln -sf"
+ """This command creates a symbolic link using the "ln -sf"
command, The *-f* option removes the link ("linkname")
if it exists already.
"""
@@ -3882,13 +3882,13 @@ class GuestFS:
return libguestfsmod.ln_sf (self._o, target, linkname)
def readlink (self, path):
- u"""This command reads the target of a symbolic link.
+ """This command reads the target of a symbolic link.
"""
self._check_not_closed ()
return libguestfsmod.readlink (self._o, path)
def fallocate (self, path, len):
- u"""This command preallocates a file (containing zero bytes)
+ """This command preallocates a file (containing zero bytes)
named "path" of size "len" bytes. If the file exists
already, it is overwritten.
@@ -3907,7 +3907,7 @@ class GuestFS:
return libguestfsmod.fallocate (self._o, path, len)
def swapon_device (self, device):
- u"""This command enables the libguestfs appliance to use the
+ """This command enables the libguestfs appliance to use the
swap device or partition named "device". The increased
memory is made available for all commands, for example
those run using "g.command" or "g.sh".
@@ -3924,7 +3924,7 @@ class GuestFS:
return libguestfsmod.swapon_device (self._o, device)
def swapoff_device (self, device):
- u"""This command disables the libguestfs appliance swap
+ """This command disables the libguestfs appliance swap
device or partition named "device". See
"g.swapon_device".
"""
@@ -3932,49 +3932,49 @@ class GuestFS:
return libguestfsmod.swapoff_device (self._o, device)
def swapon_file (self, file):
- u"""This command enables swap to a file. See
+ """This command enables swap to a file. See
"g.swapon_device" for other notes.
"""
self._check_not_closed ()
return libguestfsmod.swapon_file (self._o, file)
def swapoff_file (self, file):
- u"""This command disables the libguestfs appliance swap on
+ """This command disables the libguestfs appliance swap on
file.
"""
self._check_not_closed ()
return libguestfsmod.swapoff_file (self._o, file)
def swapon_label (self, label):
- u"""This command enables swap to a labeled swap partition.
+ """This command enables swap to a labeled swap partition.
See "g.swapon_device" for other notes.
"""
self._check_not_closed ()
return libguestfsmod.swapon_label (self._o, label)
def swapoff_label (self, label):
- u"""This command disables the libguestfs appliance swap on
+ """This command disables the libguestfs appliance swap on
labeled swap partition.
"""
self._check_not_closed ()
return libguestfsmod.swapoff_label (self._o, label)
def swapon_uuid (self, uuid):
- u"""This command enables swap to a swap partition with the
+ """This command enables swap to a swap partition with the
given UUID. See "g.swapon_device" for other notes.
"""
self._check_not_closed ()
return libguestfsmod.swapon_uuid (self._o, uuid)
def swapoff_uuid (self, uuid):
- u"""This command disables the libguestfs appliance swap
+ """This command disables the libguestfs appliance swap
partition with the given UUID.
"""
self._check_not_closed ()
return libguestfsmod.swapoff_uuid (self._o, uuid)
def mkswap_file (self, path):
- u"""Create a swap file.
+ """Create a swap file.
This command just writes a swap file signature to an
existing file. To create the file itself, use something
@@ -3984,7 +3984,7 @@ class GuestFS:
return libguestfsmod.mkswap_file (self._o, path)
def inotify_init (self, maxevents):
- u"""This command creates a new inotify handle. The inotify
+ """This command creates a new inotify handle. The inotify
subsystem can be used to notify events which happen to
objects in the guest filesystem.
@@ -4021,7 +4021,7 @@ class GuestFS:
return libguestfsmod.inotify_init (self._o, maxevents)
def inotify_add_watch (self, path, mask):
- u"""Watch "path" for the events listed in "mask".
+ """Watch "path" for the events listed in "mask".
Note that if "path" is a directory then events within
that directory are watched, but this does *not* happen
@@ -4035,14 +4035,14 @@ class GuestFS:
return libguestfsmod.inotify_add_watch (self._o, path, mask)
def inotify_rm_watch (self, wd):
- u"""Remove a previously defined inotify watch. See
+ """Remove a previously defined inotify watch. See
"g.inotify_add_watch".
"""
self._check_not_closed ()
return libguestfsmod.inotify_rm_watch (self._o, wd)
def inotify_read (self):
- u"""Return the complete queue of events that have happened
+ """Return the complete queue of events that have happened
since the previous read call.
If no events have happened, this returns an empty list.
@@ -4060,7 +4060,7 @@ class GuestFS:
return libguestfsmod.inotify_read (self._o)
def inotify_files (self):
- u"""This function is a helpful wrapper around
+ """This function is a helpful wrapper around
"g.inotify_read" which just returns a list of pathnames
of objects that were touched. The returned pathnames are
sorted and deduplicated.
@@ -4071,7 +4071,7 @@ class GuestFS:
return libguestfsmod.inotify_files (self._o)
def inotify_close (self):
- u"""This closes the inotify handle which was previously
+ """This closes the inotify handle which was previously
opened by inotify_init. It removes all watches, throws
away any pending events, and deallocates all resources.
"""
@@ -4079,7 +4079,7 @@ class GuestFS:
return libguestfsmod.inotify_close (self._o)
def setcon (self, context):
- u"""This sets the SELinux security context of the daemon to
+ """This sets the SELinux security context of the daemon to
the string "context".
See the documentation about SELINUX in guestfs(3).
@@ -4088,7 +4088,7 @@ class GuestFS:
return libguestfsmod.setcon (self._o, context)
def getcon (self):
- u"""This gets the SELinux security context of the daemon.
+ """This gets the SELinux security context of the daemon.
See the documentation about SELINUX in guestfs(3), and
"g.setcon"
@@ -4097,7 +4097,7 @@ class GuestFS:
return libguestfsmod.getcon (self._o)
def mkfs_b (self, fstype, blocksize, device):
- u"""This call is similar to "g.mkfs", but it allows you to
+ """This call is similar to "g.mkfs", but it allows you to
control the block size of the resulting filesystem.
Supported block sizes depend on the filesystem type, but
typically they are 1024, 2048 or 4096 only.
@@ -4116,7 +4116,7 @@ class GuestFS:
return libguestfsmod.mkfs_b (self._o, fstype, blocksize, device)
def mke2journal (self, blocksize, device):
- u"""This creates an ext2 external journal on "device". It is
+ """This creates an ext2 external journal on "device". It is
equivalent to the command:
mke2fs -O journal_dev -b blocksize device
@@ -4125,21 +4125,21 @@ class GuestFS:
return libguestfsmod.mke2journal (self._o, blocksize, device)
def mke2journal_L (self, blocksize, label, device):
- u"""This creates an ext2 external journal on "device" with
+ """This creates an ext2 external journal on "device" with
label "label".
"""
self._check_not_closed ()
return libguestfsmod.mke2journal_L (self._o, blocksize, label, device)
def mke2journal_U (self, blocksize, uuid, device):
- u"""This creates an ext2 external journal on "device" with
+ """This creates an ext2 external journal on "device" with
UUID "uuid".
"""
self._check_not_closed ()
return libguestfsmod.mke2journal_U (self._o, blocksize, uuid, device)
def mke2fs_J (self, fstype, blocksize, device, journal):
- u"""This creates an ext2/3/4 filesystem on "device" with an
+ """This creates an ext2/3/4 filesystem on "device" with an
external journal on "journal". It is equivalent to the
command:
@@ -4151,7 +4151,7 @@ class GuestFS:
return libguestfsmod.mke2fs_J (self._o, fstype, blocksize, device, journal)
def mke2fs_JL (self, fstype, blocksize, device, label):
- u"""This creates an ext2/3/4 filesystem on "device" with an
+ """This creates an ext2/3/4 filesystem on "device" with an
external journal on the journal labeled "label".
See also "g.mke2journal_L".
@@ -4160,7 +4160,7 @@ class GuestFS:
return libguestfsmod.mke2fs_JL (self._o, fstype, blocksize, device, label)
def mke2fs_JU (self, fstype, blocksize, device, uuid):
- u"""This creates an ext2/3/4 filesystem on "device" with an
+ """This creates an ext2/3/4 filesystem on "device" with an
external journal on the journal with UUID "uuid".
See also "g.mke2journal_U".
@@ -4169,7 +4169,7 @@ class GuestFS:
return libguestfsmod.mke2fs_JU (self._o, fstype, blocksize, device, uuid)
def modprobe (self, modulename):
- u"""This loads a kernel module in the appliance.
+ """This loads a kernel module in the appliance.
The kernel module must have been whitelisted when
libguestfs was built (see "appliance/kmod.whitelist.in"
@@ -4179,7 +4179,7 @@ class GuestFS:
return libguestfsmod.modprobe (self._o, modulename)
def echo_daemon (self, words):
- u"""This command concatenates the list of "words" passed
+ """This command concatenates the list of "words" passed
with single spaces between them and returns the
resulting string.
@@ -4193,7 +4193,7 @@ class GuestFS:
return libguestfsmod.echo_daemon (self._o, words)
def find0 (self, directory, files):
- u"""This command lists out all files and directories,
+ """This command lists out all files and directories,
recursively, starting at "directory", placing the
resulting list in the external file called "files".
@@ -4214,7 +4214,7 @@ class GuestFS:
return libguestfsmod.find0 (self._o, directory, files)
def case_sensitive_path (self, path):
- u"""This can be used to resolve case insensitive paths on a
+ """This can be used to resolve case insensitive paths on a
filesystem which is case sensitive. The use case is to
resolve paths which you have read from Windows
configuration files or the Windows Registry, to the true
@@ -4253,7 +4253,7 @@ class GuestFS:
return libguestfsmod.case_sensitive_path (self._o, path)
def vfs_type (self, device):
- u"""This command gets the filesystem type corresponding to
+ """This command gets the filesystem type corresponding to
the filesystem on "device".
For most filesystems, the result is the name of the
@@ -4266,14 +4266,14 @@ class GuestFS:
return libguestfsmod.vfs_type (self._o, device)
def truncate (self, path):
- u"""This command truncates "path" to a zero-length file. The
+ """This command truncates "path" to a zero-length file. The
file must exist already.
"""
self._check_not_closed ()
return libguestfsmod.truncate (self._o, path)
def truncate_size (self, path, size):
- u"""This command truncates "path" to size "size" bytes. The
+ """This command truncates "path" to size "size" bytes. The
file must exist already.
If the current file size is less than "size" then the
@@ -4287,7 +4287,7 @@ class GuestFS:
return libguestfsmod.truncate_size (self._o, path, size)
def utimens (self, path, atsecs, atnsecs, mtsecs, mtnsecs):
- u"""This command sets the timestamps of a file with
+ """This command sets the timestamps of a file with
nanosecond precision.
"atsecs, atnsecs" are the last access time (atime) in
@@ -4308,7 +4308,7 @@ class GuestFS:
return libguestfsmod.utimens (self._o, path, atsecs, atnsecs, mtsecs, mtnsecs)
def mkdir_mode (self, path, mode):
- u"""This command creates a directory, setting the initial
+ """This command creates a directory, setting the initial
permissions of the directory to "mode".
For common Linux filesystems, the actual mode which is
@@ -4321,7 +4321,7 @@ class GuestFS:
return libguestfsmod.mkdir_mode (self._o, path, mode)
def lchown (self, owner, group, path):
- u"""Change the file owner to "owner" and group to "group".
+ """Change the file owner to "owner" and group to "group".
This is like "g.chown" but if "path" is a symlink then
the link itself is changed, not the target.
@@ -4334,7 +4334,7 @@ class GuestFS:
return libguestfsmod.lchown (self._o, owner, group, path)
def lstatlist (self, path, names):
- u"""This call allows you to perform the "g.lstat" operation
+ """This call allows you to perform the "g.lstat" operation
on multiple files, where all files are in the directory
"path". "names" is the list of files from this
directory.
@@ -4361,7 +4361,7 @@ class GuestFS:
return libguestfsmod.lstatlist (self._o, path, names)
def lxattrlist (self, path, names):
- u"""This call allows you to get the extended attributes of
+ """This call allows you to get the extended attributes of
multiple files, where all files are in the directory
"path". "names" is the list of files from this
directory.
@@ -4394,7 +4394,7 @@ class GuestFS:
return libguestfsmod.lxattrlist (self._o, path, names)
def readlinklist (self, path, names):
- u"""This call allows you to do a "readlink" operation on
+ """This call allows you to do a "readlink" operation on
multiple files, where all files are in the directory
"path". "names" is the list of files from this
directory.
@@ -4424,7 +4424,7 @@ class GuestFS:
return libguestfsmod.readlinklist (self._o, path, names)
def pread (self, path, count, offset):
- u"""This command lets you read part of a file. It reads
+ """This command lets you read part of a file. It reads
"count" bytes of the file, starting at "offset", from
file "path".
@@ -4441,7 +4441,7 @@ class GuestFS:
return libguestfsmod.pread (self._o, path, count, offset)
def part_init (self, device, parttype):
- u"""This creates an empty partition table on "device" of one
+ """This creates an empty partition table on "device" of one
of the partition types listed below. Usually "parttype"
should be either "msdos" or "gpt" (for large disks).
@@ -4491,7 +4491,7 @@ class GuestFS:
return libguestfsmod.part_init (self._o, device, parttype)
def part_add (self, device, prlogex, startsect, endsect):
- u"""This command adds a partition to "device". If there is
+ """This command adds a partition to "device". If there is
no partition table on the device, call "g.part_init"
first.
@@ -4512,7 +4512,7 @@ class GuestFS:
return libguestfsmod.part_add (self._o, device, prlogex, startsect, endsect)
def part_disk (self, device, parttype):
- u"""This command is simply a combination of "g.part_init"
+ """This command is simply a combination of "g.part_init"
followed by "g.part_add" to create a single primary
partition covering the whole disk.
@@ -4524,7 +4524,7 @@ class GuestFS:
return libguestfsmod.part_disk (self._o, device, parttype)
def part_set_bootable (self, device, partnum, bootable):
- u"""This sets the bootable flag on partition numbered
+ """This sets the bootable flag on partition numbered
"partnum" on device "device". Note that partitions are
numbered from 1.
@@ -4536,7 +4536,7 @@ class GuestFS:
return libguestfsmod.part_set_bootable (self._o, device, partnum, bootable)
def part_set_name (self, device, partnum, name):
- u"""This sets the partition name on partition numbered
+ """This sets the partition name on partition numbered
"partnum" on device "device". Note that partitions are
numbered from 1.
@@ -4548,7 +4548,7 @@ class GuestFS:
return libguestfsmod.part_set_name (self._o, device, partnum, name)
def part_list (self, device):
- u"""This command parses the partition table on "device" and
+ """This command parses the partition table on "device" and
returns the list of partitions found.
The fields in the returned structure are:
@@ -4574,7 +4574,7 @@ class GuestFS:
return libguestfsmod.part_list (self._o, device)
def part_get_parttype (self, device):
- u"""This command examines the partition table on "device"
+ """This command examines the partition table on "device"
and returns the partition table type (format) being
used.
@@ -4587,7 +4587,7 @@ class GuestFS:
return libguestfsmod.part_get_parttype (self._o, device)
def fill (self, c, len, path):
- u"""This command creates a new file called "path". The
+ """This command creates a new file called "path". The
initial content of the file is "len" octets of "c",
where "c" must be a number in the range "[0..255]".
@@ -4600,7 +4600,7 @@ class GuestFS:
return libguestfsmod.fill (self._o, c, len, path)
def available (self, groups):
- u"""This command is used to check the availability of some
+ """This command is used to check the availability of some
groups of functionality in the appliance, which not all
builds of the libguestfs appliance will be able to
provide.
@@ -4654,7 +4654,7 @@ class GuestFS:
return libguestfsmod.available (self._o, groups)
def dd (self, src, dest):
- u"""This command copies from one source device or file "src"
+ """This command copies from one source device or file "src"
to another destination device or file "dest". Normally
you would use this to copy to or from a device or
partition, for example to duplicate a filesystem.
@@ -4675,7 +4675,7 @@ class GuestFS:
return libguestfsmod.dd (self._o, src, dest)
def filesize (self, file):
- u"""This command returns the size of "file" in bytes.
+ """This command returns the size of "file" in bytes.
To get other stats about a file, use "g.stat",
"g.lstat", "g.is_dir", "g.is_file" etc. To get the size
@@ -4685,21 +4685,21 @@ class GuestFS:
return libguestfsmod.filesize (self._o, file)
def lvrename (self, logvol, newlogvol):
- u"""Rename a logical volume "logvol" with the new name
+ """Rename a logical volume "logvol" with the new name
"newlogvol".
"""
self._check_not_closed ()
return libguestfsmod.lvrename (self._o, logvol, newlogvol)
def vgrename (self, volgroup, newvolgroup):
- u"""Rename a volume group "volgroup" with the new name
+ """Rename a volume group "volgroup" with the new name
"newvolgroup".
"""
self._check_not_closed ()
return libguestfsmod.vgrename (self._o, volgroup, newvolgroup)
def initrd_cat (self, initrdpath, filename):
- u"""This command unpacks the file "filename" from the initrd
+ """This command unpacks the file "filename" from the initrd
file called "initrdpath". The filename must be given
*without* the initial "/" character.
@@ -4719,26 +4719,26 @@ class GuestFS:
return libguestfsmod.initrd_cat (self._o, initrdpath, filename)
def pvuuid (self, device):
- u"""This command returns the UUID of the LVM PV "device".
+ """This command returns the UUID of the LVM PV "device".
"""
self._check_not_closed ()
return libguestfsmod.pvuuid (self._o, device)
def vguuid (self, vgname):
- u"""This command returns the UUID of the LVM VG named
+ """This command returns the UUID of the LVM VG named
"vgname".
"""
self._check_not_closed ()
return libguestfsmod.vguuid (self._o, vgname)
def lvuuid (self, device):
- u"""This command returns the UUID of the LVM LV "device".
+ """This command returns the UUID of the LVM LV "device".
"""
self._check_not_closed ()
return libguestfsmod.lvuuid (self._o, device)
def vgpvuuids (self, vgname):
- u"""Given a VG called "vgname", this returns the UUIDs of
+ """Given a VG called "vgname", this returns the UUIDs of
all the physical volumes that this volume group resides
on.
@@ -4753,7 +4753,7 @@ class GuestFS:
return libguestfsmod.vgpvuuids (self._o, vgname)
def vglvuuids (self, vgname):
- u"""Given a VG called "vgname", this returns the UUIDs of
+ """Given a VG called "vgname", this returns the UUIDs of
all the logical volumes created in this volume group.
You can use this along with "g.lvs" and "g.lvuuid" calls
@@ -4767,7 +4767,7 @@ class GuestFS:
return libguestfsmod.vglvuuids (self._o, vgname)
def copy_size (self, src, dest, size):
- u"""This command copies exactly "size" bytes from one source
+ """This command copies exactly "size" bytes from one source
device or file "src" to another destination device or
file "dest".
@@ -4785,7 +4785,7 @@ class GuestFS:
return libguestfsmod.copy_size (self._o, src, dest, size)
def zero_device (self, device):
- u"""This command writes zeroes over the entire "device".
+ """This command writes zeroes over the entire "device".
Compare with "g.zero" which just zeroes the first few
blocks of a device.
@@ -4797,14 +4797,14 @@ class GuestFS:
return libguestfsmod.zero_device (self._o, device)
def txz_in (self, tarball, directory):
- u"""This command uploads and unpacks local file "tarball"
+ """This command uploads and unpacks local file "tarball"
(an *xz compressed* tar file) into "directory".
"""
self._check_not_closed ()
return libguestfsmod.txz_in (self._o, tarball, directory)
def txz_out (self, directory, tarball):
- u"""This command packs the contents of "directory" and
+ """This command packs the contents of "directory" and
downloads it to local file "tarball" (as an xz
compressed tar archive).
"""
@@ -4812,7 +4812,7 @@ class GuestFS:
return libguestfsmod.txz_out (self._o, directory, tarball)
def ntfsresize (self, device):
- u"""This command resizes an NTFS filesystem, expanding or
+ """This command resizes an NTFS filesystem, expanding or
shrinking it to the size of the underlying device.
*Note:* After the resize operation, the filesystem is
@@ -4837,14 +4837,14 @@ class GuestFS:
return libguestfsmod.ntfsresize (self._o, device)
def vgscan (self):
- u"""This rescans all block devices and rebuilds the list of
+ """This rescans all block devices and rebuilds the list of
LVM physical volumes, volume groups and logical volumes.
"""
self._check_not_closed ()
return libguestfsmod.vgscan (self._o)
def part_del (self, device, partnum):
- u"""This command deletes the partition numbered "partnum" on
+ """This command deletes the partition numbered "partnum" on
"device".
Note that in the case of MBR partitioning, deleting an
@@ -4855,7 +4855,7 @@ class GuestFS:
return libguestfsmod.part_del (self._o, device, partnum)
def part_get_bootable (self, device, partnum):
- u"""This command returns true if the partition "partnum" on
+ """This command returns true if the partition "partnum" on
"device" has the bootable flag set.
See also "g.part_set_bootable".
@@ -4864,7 +4864,7 @@ class GuestFS:
return libguestfsmod.part_get_bootable (self._o, device, partnum)
def part_get_mbr_id (self, device, partnum):
- u"""Returns the MBR type byte (also known as the ID byte)
+ """Returns the MBR type byte (also known as the ID byte)
from the numbered partition "partnum".
Note that only MBR (old DOS-style) partitions have type
@@ -4875,7 +4875,7 @@ class GuestFS:
return libguestfsmod.part_get_mbr_id (self._o, device, partnum)
def part_set_mbr_id (self, device, partnum, idbyte):
- u"""Sets the MBR type byte (also known as the ID byte) of
+ """Sets the MBR type byte (also known as the ID byte) of
the numbered partition "partnum" to "idbyte". Note that
the type bytes quoted in most documentation are in fact
hexadecimal numbers, but usually documented without any
@@ -4889,7 +4889,7 @@ class GuestFS:
return libguestfsmod.part_set_mbr_id (self._o, device, partnum, idbyte)
def checksum_device (self, csumtype, device):
- u"""This call computes the MD5, SHAx or CRC checksum of the
+ """This call computes the MD5, SHAx or CRC checksum of the
contents of the device named "device". For the types of
checksums supported see the "g.checksum" command.
"""
@@ -4897,7 +4897,7 @@ class GuestFS:
return libguestfsmod.checksum_device (self._o, csumtype, device)
def lvresize_free (self, lv, percent):
- u"""This expands an existing logical volume "lv" so that it
+ """This expands an existing logical volume "lv" so that it
fills "pc"% of the remaining free space in the volume
group. Commonly you would call this with pc = 100 which
expands the logical volume as much as possible, using
@@ -4907,14 +4907,14 @@ class GuestFS:
return libguestfsmod.lvresize_free (self._o, lv, percent)
def aug_clear (self, augpath):
- u"""Set the value associated with "path" to "NULL". This is
+ """Set the value associated with "path" to "NULL". This is
the same as the augtool(1) "clear" command.
"""
self._check_not_closed ()
return libguestfsmod.aug_clear (self._o, augpath)
def get_umask (self):
- u"""Return the current umask. By default the umask is 022
+ """Return the current umask. By default the umask is 022
unless it has been set by calling "g.umask".
"""
self._check_not_closed ()
@@ -4925,14 +4925,14 @@ class GuestFS:
return libguestfsmod.debug_upload (self._o, filename, tmpname, mode)
def base64_in (self, base64file, filename):
- u"""This command uploads base64-encoded data from
+ """This command uploads base64-encoded data from
"base64file" to "filename".
"""
self._check_not_closed ()
return libguestfsmod.base64_in (self._o, base64file, filename)
def base64_out (self, filename, base64file):
- u"""This command downloads the contents of "filename",
+ """This command downloads the contents of "filename",
writing it out to local file "base64file" encoded as
base64.
"""
@@ -4940,7 +4940,7 @@ class GuestFS:
return libguestfsmod.base64_out (self._o, filename, base64file)
def checksums_out (self, csumtype, directory, sumsfile):
- u"""This command computes the checksums of all regular files
+ """This command computes the checksums of all regular files
in "directory" and then emits a list of those checksums
to the local output file "sumsfile".
@@ -4956,7 +4956,7 @@ class GuestFS:
return libguestfsmod.checksums_out (self._o, csumtype, directory, sumsfile)
def fill_pattern (self, pattern, len, path):
- u"""This function is like "g.fill" except that it creates a
+ """This function is like "g.fill" except that it creates a
new file of length "len" containing the repeating
pattern of bytes in "pattern". The pattern is truncated
if necessary to ensure the length of the file is exactly
@@ -4966,7 +4966,7 @@ class GuestFS:
return libguestfsmod.fill_pattern (self._o, pattern, len, path)
def write (self, path, content):
- u"""This call creates a file called "path". The content of
+ """This call creates a file called "path". The content of
the file is the string "content" (which can contain any
8 bit data).
@@ -4980,7 +4980,7 @@ class GuestFS:
return libguestfsmod.write (self._o, path, content)
def pwrite (self, path, content, offset):
- u"""This command writes to part of a file. It writes the
+ """This command writes to part of a file. It writes the
data buffer "content" to the file "path" starting at
offset "offset".
@@ -5001,7 +5001,7 @@ class GuestFS:
return libguestfsmod.pwrite (self._o, path, content, offset)
def resize2fs_size (self, device, size):
- u"""This command is the same as "g.resize2fs" except that it
+ """This command is the same as "g.resize2fs" except that it
allows you to specify the new size (in bytes)
explicitly.
"""
@@ -5009,7 +5009,7 @@ class GuestFS:
return libguestfsmod.resize2fs_size (self._o, device, size)
def pvresize_size (self, device, size):
- u"""This command is the same as "g.pvresize" except that it
+ """This command is the same as "g.pvresize" except that it
allows you to specify the new size (in bytes)
explicitly.
"""
@@ -5017,7 +5017,7 @@ class GuestFS:
return libguestfsmod.pvresize_size (self._o, device, size)
def ntfsresize_size (self, device, size):
- u"""This command is the same as "g.ntfsresize" except that
+ """This command is the same as "g.ntfsresize" except that
it allows you to specify the new size (in bytes)
explicitly.
@@ -5032,7 +5032,7 @@ class GuestFS:
return libguestfsmod.ntfsresize_size (self._o, device, size)
def available_all_groups (self):
- u"""This command returns a list of all optional groups that
+ """This command returns a list of all optional groups that
this daemon knows about. Note this returns both
supported and unsupported groups. To find out which ones
the daemon can actually support you have to call
@@ -5046,7 +5046,7 @@ class GuestFS:
return libguestfsmod.available_all_groups (self._o)
def fallocate64 (self, path, len):
- u"""This command preallocates a file (containing zero bytes)
+ """This command preallocates a file (containing zero bytes)
named "path" of size "len" bytes. If the file exists
already, it is overwritten.
@@ -5066,7 +5066,7 @@ class GuestFS:
return libguestfsmod.fallocate64 (self._o, path, len)
def vfs_label (self, device):
- u"""This returns the filesystem label of the filesystem on
+ """This returns the filesystem label of the filesystem on
"device".
If the filesystem is unlabeled, this returns the empty
@@ -5079,7 +5079,7 @@ class GuestFS:
return libguestfsmod.vfs_label (self._o, device)
def vfs_uuid (self, device):
- u"""This returns the filesystem UUID of the filesystem on
+ """This returns the filesystem UUID of the filesystem on
"device".
If the filesystem does not have a UUID, this returns the
@@ -5091,7 +5091,7 @@ class GuestFS:
return libguestfsmod.vfs_uuid (self._o, device)
def lvm_set_filter (self, devices):
- u"""This sets the LVM device filter so that LVM will only be
+ """This sets the LVM device filter so that LVM will only be
able to "see" the block devices in the list "devices",
and will ignore all other attached block devices.
@@ -5120,7 +5120,7 @@ class GuestFS:
return libguestfsmod.lvm_set_filter (self._o, devices)
def lvm_clear_filter (self):
- u"""This undoes the effect of "g.lvm_set_filter". LVM will
+ """This undoes the effect of "g.lvm_set_filter". LVM will
be able to see every block device.
This command also clears the LVM cache and performs a
@@ -5130,7 +5130,7 @@ class GuestFS:
return libguestfsmod.lvm_clear_filter (self._o)
def luks_open (self, device, key, mapname):
- u"""This command opens a block device which has been
+ """This command opens a block device which has been
encrypted according to the Linux Unified Key Setup
(LUKS) standard.
@@ -5155,14 +5155,14 @@ class GuestFS:
return libguestfsmod.luks_open (self._o, device, key, mapname)
def luks_open_ro (self, device, key, mapname):
- u"""This is the same as "g.luks_open" except that a
+ """This is the same as "g.luks_open" except that a
read-only mapping is created.
"""
self._check_not_closed ()
return libguestfsmod.luks_open_ro (self._o, device, key, mapname)
def luks_close (self, device):
- u"""This closes a LUKS device that was created earlier by
+ """This closes a LUKS device that was created earlier by
"g.luks_open" or "g.luks_open_ro". The "device"
parameter must be the name of the LUKS mapping device
(ie. "/dev/mapper/mapname") and *not* the name of the
@@ -5172,7 +5172,7 @@ class GuestFS:
return libguestfsmod.luks_close (self._o, device)
def luks_format (self, device, key, keyslot):
- u"""This command erases existing data on "device" and
+ """This command erases existing data on "device" and
formats the device as a LUKS encrypted device. "key" is
the initial key, which is added to key slot "slot".
(LUKS supports 8 key slots, numbered 0-7).
@@ -5181,14 +5181,14 @@ class GuestFS:
return libguestfsmod.luks_format (self._o, device, key, keyslot)
def luks_format_cipher (self, device, key, keyslot, cipher):
- u"""This command is the same as "g.luks_format" but it also
+ """This command is the same as "g.luks_format" but it also
allows you to set the "cipher" used.
"""
self._check_not_closed ()
return libguestfsmod.luks_format_cipher (self._o, device, key, keyslot, cipher)
def luks_add_key (self, device, key, newkey, keyslot):
- u"""This command adds a new key on LUKS device "device".
+ """This command adds a new key on LUKS device "device".
"key" is any existing key, and is used to access the
device. "newkey" is the new key to add. "keyslot" is the
key slot that will be replaced.
@@ -5201,7 +5201,7 @@ class GuestFS:
return libguestfsmod.luks_add_key (self._o, device, key, newkey, keyslot)
def luks_kill_slot (self, device, key, keyslot):
- u"""This command deletes the key in key slot "keyslot" from
+ """This command deletes the key in key slot "keyslot" from
the encrypted LUKS device "device". "key" must be one of
the *other* keys.
"""
@@ -5209,14 +5209,14 @@ class GuestFS:
return libguestfsmod.luks_kill_slot (self._o, device, key, keyslot)
def is_lv (self, device):
- u"""This command tests whether "device" is a logical volume,
+ """This command tests whether "device" is a logical volume,
and returns true iff this is the case.
"""
self._check_not_closed ()
return libguestfsmod.is_lv (self._o, device)
def findfs_uuid (self, uuid):
- u"""This command searches the filesystems and returns the
+ """This command searches the filesystems and returns the
one which has the given UUID. An error is returned if no
such filesystem can be found.
@@ -5226,7 +5226,7 @@ class GuestFS:
return libguestfsmod.findfs_uuid (self._o, uuid)
def findfs_label (self, label):
- u"""This command searches the filesystems and returns the
+ """This command searches the filesystems and returns the
one which has the given label. An error is returned if
no such filesystem can be found.
@@ -5236,7 +5236,7 @@ class GuestFS:
return libguestfsmod.findfs_label (self._o, label)
def is_chardev (self, path):
- u"""This returns "true" if and only if there is a character
+ """This returns "true" if and only if there is a character
device with the given "path" name.
See also "g.stat".
@@ -5245,7 +5245,7 @@ class GuestFS:
return libguestfsmod.is_chardev (self._o, path)
def is_blockdev (self, path):
- u"""This returns "true" if and only if there is a block
+ """This returns "true" if and only if there is a block
device with the given "path" name.
See also "g.stat".
@@ -5254,7 +5254,7 @@ class GuestFS:
return libguestfsmod.is_blockdev (self._o, path)
def is_fifo (self, path):
- u"""This returns "true" if and only if there is a FIFO
+ """This returns "true" if and only if there is a FIFO
(named pipe) with the given "path" name.
See also "g.stat".
@@ -5263,7 +5263,7 @@ class GuestFS:
return libguestfsmod.is_fifo (self._o, path)
def is_symlink (self, path):
- u"""This returns "true" if and only if there is a symbolic
+ """This returns "true" if and only if there is a symbolic
link with the given "path" name.
See also "g.stat".
@@ -5272,7 +5272,7 @@ class GuestFS:
return libguestfsmod.is_symlink (self._o, path)
def is_socket (self, path):
- u"""This returns "true" if and only if there is a Unix
+ """This returns "true" if and only if there is a Unix
domain socket with the given "path" name.
See also "g.stat".
@@ -5281,7 +5281,7 @@ class GuestFS:
return libguestfsmod.is_socket (self._o, path)
def part_to_dev (self, partition):
- u"""This function takes a partition name (eg. "/dev/sdb1")
+ """This function takes a partition name (eg. "/dev/sdb1")
and removes the partition number, returning the device
name (eg. "/dev/sdb").
@@ -5294,7 +5294,7 @@ class GuestFS:
return libguestfsmod.part_to_dev (self._o, partition)
def upload_offset (self, filename, remotefilename, offset):
- u"""Upload local file "filename" to "remotefilename" on the
+ """Upload local file "filename" to "remotefilename" on the
filesystem.
"remotefilename" is overwritten starting at the byte
@@ -5315,7 +5315,7 @@ class GuestFS:
return libguestfsmod.upload_offset (self._o, filename, remotefilename, offset)
def download_offset (self, remotefilename, filename, offset, size):
- u"""Download file "remotefilename" and save it as "filename"
+ """Download file "remotefilename" and save it as "filename"
on the local machine.
"remotefilename" is read for "size" bytes starting at
@@ -5333,7 +5333,7 @@ class GuestFS:
return libguestfsmod.download_offset (self._o, remotefilename, filename, offset, size)
def pwrite_device (self, device, content, offset):
- u"""This command writes to part of a device. It writes the
+ """This command writes to part of a device. It writes the
data buffer "content" to "device" starting at offset
"offset".
@@ -5353,7 +5353,7 @@ class GuestFS:
return libguestfsmod.pwrite_device (self._o, device, content, offset)
def pread_device (self, device, count, offset):
- u"""This command lets you read part of a file. It reads
+ """This command lets you read part of a file. It reads
"count" bytes of "device", starting at "offset".
This may read fewer bytes than requested. For further
@@ -5369,7 +5369,7 @@ class GuestFS:
return libguestfsmod.pread_device (self._o, device, count, offset)
def lvm_canonical_lv_name (self, lvname):
- u"""This converts alternative naming schemes for LVs that
+ """This converts alternative naming schemes for LVs that
you might find to the canonical name. For example,
"/dev/mapper/VG-LV" is converted to "/dev/VG/LV".
@@ -5382,7 +5382,7 @@ class GuestFS:
return libguestfsmod.lvm_canonical_lv_name (self._o, lvname)
def mkfs_opts (self, fstype, device, blocksize=-1, features=None, inode=-1, sectorsize=-1):
- u"""This function creates a filesystem on "device". The
+ """This function creates a filesystem on "device". The
filesystem type is "fstype", for example "ext3".
The optional arguments are:
@@ -5422,7 +5422,7 @@ class GuestFS:
return libguestfsmod.mkfs_opts (self._o, fstype, device, blocksize, features, inode, sectorsize)
def getxattr (self, path, name):
- u"""Get a single extended attribute from file "path" named
+ """Get a single extended attribute from file "path" named
"name". This call follows symlinks. If you want to
lookup an extended attribute for the symlink itself, use
"g.lgetxattr".
@@ -5445,7 +5445,7 @@ class GuestFS:
return libguestfsmod.getxattr (self._o, path, name)
def lgetxattr (self, path, name):
- u"""Get a single extended attribute from file "path" named
+ """Get a single extended attribute from file "path" named
"name". If "path" is a symlink, then this call returns
an extended attribute from the symlink.
@@ -5467,7 +5467,7 @@ class GuestFS:
return libguestfsmod.lgetxattr (self._o, path, name)
def resize2fs_M (self, device):
- u"""This command is the same as "g.resize2fs", but the
+ """This command is the same as "g.resize2fs", but the
filesystem is resized to its minimum size. This works
like the *-M* option to the "resize2fs" command.
@@ -5485,14 +5485,14 @@ class GuestFS:
return libguestfsmod.internal_autosync (self._o)
def is_zero (self, path):
- u"""This returns true iff the file exists and the file is
+ """This returns true iff the file exists and the file is
empty or it contains all zero bytes.
"""
self._check_not_closed ()
return libguestfsmod.is_zero (self._o, path)
def is_zero_device (self, device):
- u"""This returns true iff the device exists and contains all
+ """This returns true iff the device exists and contains all
zero bytes.
Note that for large devices this can take a long time to
@@ -5502,7 +5502,7 @@ class GuestFS:
return libguestfsmod.is_zero_device (self._o, device)
def list_9p (self):
- u"""List all 9p filesystems attached to the guest. A list of
+ """List all 9p filesystems attached to the guest. A list of
mount tags is returned.
This function returns a list of strings.
@@ -5511,7 +5511,7 @@ class GuestFS:
return libguestfsmod.list_9p (self._o)
def mount_9p (self, mounttag, mountpoint, options=None):
- u"""Mount the virtio-9p filesystem with the tag "mounttag"
+ """Mount the virtio-9p filesystem with the tag "mounttag"
on the directory "mountpoint".
If required, "trans=virtio" will be automatically added
@@ -5522,7 +5522,7 @@ class GuestFS:
return libguestfsmod.mount_9p (self._o, mounttag, mountpoint, options)
def list_dm_devices (self):
- u"""List all device mapper devices.
+ """List all device mapper devices.
The returned list contains "/dev/mapper/*" devices, eg.
ones created by a previous call to "g.luks_open".
@@ -5537,7 +5537,7 @@ class GuestFS:
return libguestfsmod.list_dm_devices (self._o)
def ntfsresize_opts (self, device, size=-1, force=-1):
- u"""This command resizes an NTFS filesystem, expanding or
+ """This command resizes an NTFS filesystem, expanding or
shrinking it to the size of the underlying device.
The optional parameters are:
@@ -5567,7 +5567,7 @@ class GuestFS:
return libguestfsmod.ntfsresize_opts (self._o, device, size, force)
def btrfs_filesystem_resize (self, mountpoint, size=-1):
- u"""This command resizes a btrfs filesystem.
+ """This command resizes a btrfs filesystem.
Note that unlike other resize calls, the filesystem has
to be mounted and the parameter is the mountpoint not
@@ -5586,7 +5586,7 @@ class GuestFS:
return libguestfsmod.btrfs_filesystem_resize (self._o, mountpoint, size)
def write_append (self, path, content):
- u"""This call appends "content" to the end of file "path".
+ """This call appends "content" to the end of file "path".
If "path" does not exist, then a new file is created.
See also "g.write".
@@ -5599,7 +5599,7 @@ class GuestFS:
return libguestfsmod.write_append (self._o, path, content)
def compress_out (self, ctype, file, zfile, level=-1):
- u"""This command compresses "file" and writes it out to the
+ """This command compresses "file" and writes it out to the
local file "zfile".
The compression program used is controlled by the
@@ -5617,7 +5617,7 @@ class GuestFS:
return libguestfsmod.compress_out (self._o, ctype, file, zfile, level)
def compress_device_out (self, ctype, device, zdevice, level=-1):
- u"""This command compresses "device" and writes it out to
+ """This command compresses "device" and writes it out to
the local file "zdevice".
The "ctype" and optional "level" parameters have the
@@ -5627,7 +5627,7 @@ class GuestFS:
return libguestfsmod.compress_device_out (self._o, ctype, device, zdevice, level)
def part_to_partnum (self, partition):
- u"""This function takes a partition name (eg. "/dev/sdb1")
+ """This function takes a partition name (eg. "/dev/sdb1")
and returns the partition number (eg. 1).
The named partition must exist, for example as a string
@@ -5639,7 +5639,7 @@ class GuestFS:
return libguestfsmod.part_to_partnum (self._o, partition)
def copy_device_to_device (self, src, dest, srcoffset=-1, destoffset=-1, size=-1):
- u"""The four calls "g.copy_device_to_device",
+ """The four calls "g.copy_device_to_device",
"g.copy_device_to_file", "g.copy_file_to_device", and
"g.copy_file_to_file" let you copy from a source
(device|file) to a destination (device|file).
@@ -5662,21 +5662,21 @@ class GuestFS:
return libguestfsmod.copy_device_to_device (self._o, src, dest, srcoffset, destoffset, size)
def copy_device_to_file (self, src, dest, srcoffset=-1, destoffset=-1, size=-1):
- u"""See "g.copy_device_to_device" for a general overview of
+ """See "g.copy_device_to_device" for a general overview of
this call.
"""
self._check_not_closed ()
return libguestfsmod.copy_device_to_file (self._o, src, dest, srcoffset, destoffset, size)
def copy_file_to_device (self, src, dest, srcoffset=-1, destoffset=-1, size=-1):
- u"""See "g.copy_device_to_device" for a general overview of
+ """See "g.copy_device_to_device" for a general overview of
this call.
"""
self._check_not_closed ()
return libguestfsmod.copy_file_to_device (self._o, src, dest, srcoffset, destoffset, size)
def copy_file_to_file (self, src, dest, srcoffset=-1, destoffset=-1, size=-1):
- u"""See "g.copy_device_to_device" for a general overview of
+ """See "g.copy_device_to_device" for a general overview of
this call.
This is not the function you want for copying files.
diff --git a/python/run-bindtests b/python/run-bindtests
index 08a24e6..cf28bb6 100755
--- a/python/run-bindtests
+++ b/python/run-bindtests
@@ -1,6 +1,6 @@
#!/bin/sh -
# libguestfs Perl bindings
-# Copyright (C) 2009 Red Hat Inc.
+# Copyright (C) 2009-2011 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,5 +18,5 @@
set -e
-python ${srcdir}/bindtests.py > bindtests.tmp
+$PYTHON ${srcdir}/bindtests.py > bindtests.tmp
diff -u ${srcdir}/../bindtests bindtests.tmp
diff --git a/python/run-python-tests b/python/run-python-tests
index 487f8ab..f82dc10 100755
--- a/python/run-python-tests
+++ b/python/run-python-tests
@@ -1,6 +1,6 @@
#!/bin/sh -
# libguestfs Perl bindings
-# Copyright (C) 2009 Red Hat Inc.
+# Copyright (C) 2009-2011 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,5 +19,5 @@
set -e
for f in t/*.py; do
- python $f
+ $PYTHON $f
done
diff --git a/regressions/Makefile.in b/regressions/Makefile.in
index 309c3e3..18ed706 100644
--- a/regressions/Makefile.in
+++ b/regressions/Makefile.in
@@ -979,7 +979,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/rescue/Makefile.in b/rescue/Makefile.in
index e3cf1b4..60bd3c8 100644
--- a/rescue/Makefile.in
+++ b/rescue/Makefile.in
@@ -992,7 +992,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/resize/.depend b/resize/.depend
index 17bdaca..14d8b51 100644
--- a/resize/.depend
+++ b/resize/.depend
@@ -5,3 +5,5 @@ resize.cmo: utils.cmo progress.cmi ../ocaml/guestfs.cmi
resize.cmx: utils.cmx progress.cmx ../ocaml/guestfs.cmx
utils.cmo: ../ocaml/guestfs.cmi
utils.cmx: ../ocaml/guestfs.cmx
+utils_tests.cmo: utils.cmo
+utils_tests.cmx: utils.cmx
diff --git a/resize/Makefile.am b/resize/Makefile.am
index e8ffff0..69103d6 100644
--- a/resize/Makefile.am
+++ b/resize/Makefile.am
@@ -25,7 +25,6 @@ EXTRA_DIST = \
CLEANFILES = *~ *.cmi *.cmo *.cmx *.cmxa *.o virt-resize test.img
if HAVE_OCAML
-if HAVE_OCAML_PCRE
# Alphabetical order.
SOURCES = \
@@ -33,7 +32,8 @@ SOURCES = \
progress.mli \
progress.ml \
resize.ml \
- utils.ml
+ utils.ml \
+ utils_tests.ml
# Note this list must be in dependency order.
OBJECTS = \
@@ -48,7 +48,7 @@ bin_SCRIPTS = virt-resize
# -I $(top_builddir)/src/.libs is a hack which forces corresponding -L
# option to be passed to gcc, so we don't try linking against an
# installed copy of libguestfs.
-OCAMLPACKAGES = -package pcre -I $(top_builddir)/src/.libs -I ../ocaml
+OCAMLPACKAGES = -package str -I $(top_builddir)/src/.libs -I ../ocaml
OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX $(OCAMLPACKAGES)
OCAMLOPTFLAGS = $(OCAMLCFLAGS)
@@ -91,6 +91,12 @@ CLEANFILES += stamp-virt-resize.pod
# Tests.
+check_SCRIPTS = utils_tests
+
+utils_tests: utils.cmx utils_tests.cmx
+ $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \
+ mlguestfs.cmxa -linkpkg $^ -cclib -lncurses -o $@
+
random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null)
TESTS_ENVIRONMENT = \
@@ -99,7 +105,7 @@ TESTS_ENVIRONMENT = \
LIBGUESTFS_PATH=$(top_builddir)/appliance \
TMPDIR=$(top_builddir)
-TESTS = test-virt-resize.sh
+TESTS = test-virt-resize.sh utils_tests
# Dependencies.
depend: .depend
@@ -117,7 +123,6 @@ include .depend
.PHONY: depend docs
endif
-endif
# Parallel builds don't obey dependencies for some reason we
# don't understand.
diff --git a/resize/Makefile.in b/resize/Makefile.in
index 9960a31..d91cc1d 100644
--- a/resize/Makefile.in
+++ b/resize/Makefile.in
@@ -71,7 +71,7 @@ host_triplet = @host@
DIST_COMMON = $(srcdir)/.depend $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/subdir-rules.mk
SOURCES =
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at am__append_1 = stamp-virt-resize.pod
+ at HAVE_OCAML_TRUE@am__append_1 = stamp-virt-resize.pod
subdir = resize
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
@@ -957,7 +957,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -1231,48 +1230,50 @@ CLEANFILES = *~ *.cmi *.cmo *.cmx *.cmxa *.o virt-resize test.img \
$(am__append_1)
# Alphabetical order.
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at SOURCES = \
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ progress_c.c \
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ progress.mli \
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ progress.ml \
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ resize.ml \
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ utils.ml
+ at HAVE_OCAML_TRUE@SOURCES = \
+ at HAVE_OCAML_TRUE@ progress_c.c \
+ at HAVE_OCAML_TRUE@ progress.mli \
+ at HAVE_OCAML_TRUE@ progress.ml \
+ at HAVE_OCAML_TRUE@ resize.ml \
+ at HAVE_OCAML_TRUE@ utils.ml \
+ at HAVE_OCAML_TRUE@ utils_tests.ml
# Note this list must be in dependency order.
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at OBJECTS = \
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ ../fish/guestfish-progress.o \
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ progress_c.o \
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ utils.cmx \
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ progress.cmx \
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ resize.cmx
+ at HAVE_OCAML_TRUE@OBJECTS = \
+ at HAVE_OCAML_TRUE@ ../fish/guestfish-progress.o \
+ at HAVE_OCAML_TRUE@ progress_c.o \
+ at HAVE_OCAML_TRUE@ utils.cmx \
+ at HAVE_OCAML_TRUE@ progress.cmx \
+ at HAVE_OCAML_TRUE@ resize.cmx
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at bin_SCRIPTS = virt-resize
+ at HAVE_OCAML_TRUE@bin_SCRIPTS = virt-resize
# -I $(top_builddir)/src/.libs is a hack which forces corresponding -L
# option to be passed to gcc, so we don't try linking against an
# installed copy of libguestfs.
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at OCAMLPACKAGES = -package pcre -I $(top_builddir)/src/.libs -I ../ocaml
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX $(OCAMLPACKAGES)
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at OCAMLOPTFLAGS = $(OCAMLCFLAGS)
+ at HAVE_OCAML_TRUE@OCAMLPACKAGES = -package str -I $(top_builddir)/src/.libs -I ../ocaml
+ at HAVE_OCAML_TRUE@OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX $(OCAMLPACKAGES)
+ at HAVE_OCAML_TRUE@OCAMLOPTFLAGS = $(OCAMLCFLAGS)
# automake will decide we don't need C support in this file. Really
# we do, so we have to provide it ourselves.
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(shell $(OCAMLC) -where) -I../fish
+ at HAVE_OCAML_TRUE@DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(shell $(OCAMLC) -where) -I../fish
# Manual pages and HTML files for the website.
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at man_MANS = virt-resize.1
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at noinst_DATA = $(top_builddir)/html/virt-resize.1.html
+ at HAVE_OCAML_TRUE@man_MANS = virt-resize.1
+ at HAVE_OCAML_TRUE@noinst_DATA = $(top_builddir)/html/virt-resize.1.html
# Tests.
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null)
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at TESTS_ENVIRONMENT = \
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ MALLOC_PERTURB_=$(random_val) \
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ LD_LIBRARY_PATH=$(top_builddir)/src/.libs \
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ LIBGUESTFS_PATH=$(top_builddir)/appliance \
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ TMPDIR=$(top_builddir)
-
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at TESTS = test-virt-resize.sh
+ at HAVE_OCAML_TRUE@check_SCRIPTS = utils_tests
+ at HAVE_OCAML_TRUE@random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null)
+ at HAVE_OCAML_TRUE@TESTS_ENVIRONMENT = \
+ at HAVE_OCAML_TRUE@ MALLOC_PERTURB_=$(random_val) \
+ at HAVE_OCAML_TRUE@ LD_LIBRARY_PATH=$(top_builddir)/src/.libs \
+ at HAVE_OCAML_TRUE@ LIBGUESTFS_PATH=$(top_builddir)/appliance \
+ at HAVE_OCAML_TRUE@ TMPDIR=$(top_builddir)
+
+ at HAVE_OCAML_TRUE@TESTS = test-virt-resize.sh utils_tests
all: all-am
.SUFFIXES:
@@ -1528,6 +1529,7 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS)
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
all-am: Makefile $(SCRIPTS) $(MANS) $(DATA)
@@ -1667,48 +1669,54 @@ $(top_builddir)/daemon/guestfsd: force
appliance: force
$(MAKE) -C $(top_builddir)/appliance
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at virt-resize: $(OBJECTS)
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ mlguestfs.cmxa -linkpkg $^ -cclib -lncurses -o $@
+ at HAVE_OCAML_TRUE@virt-resize: $(OBJECTS)
+ at HAVE_OCAML_TRUE@ $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \
+ at HAVE_OCAML_TRUE@ mlguestfs.cmxa -linkpkg $^ -cclib -lncurses -o $@
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at .mli.cmi:
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at .ml.cmo:
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at .ml.cmx:
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ $(OCAMLFIND) ocamlopt $(OCAMLCFLAGS) -c $< -o $@
+ at HAVE_OCAML_TRUE@.mli.cmi:
+ at HAVE_OCAML_TRUE@ $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
+ at HAVE_OCAML_TRUE@.ml.cmo:
+ at HAVE_OCAML_TRUE@ $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
+ at HAVE_OCAML_TRUE@.ml.cmx:
+ at HAVE_OCAML_TRUE@ $(OCAMLFIND) ocamlopt $(OCAMLCFLAGS) -c $< -o $@
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at .c.o:
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ $(CC) $(CFLAGS) $(PROF_CFLAGS) $(DEFAULT_INCLUDES) -c $< -o $@
+ at HAVE_OCAML_TRUE@.c.o:
+ at HAVE_OCAML_TRUE@ $(CC) $(CFLAGS) $(PROF_CFLAGS) $(DEFAULT_INCLUDES) -c $< -o $@
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at virt-resize.1 $(top_builddir)/html/virt-resize.1.html: stamp-virt-resize.pod
+ at HAVE_OCAML_TRUE@virt-resize.1 $(top_builddir)/html/virt-resize.1.html: stamp-virt-resize.pod
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at stamp-virt-resize.pod: virt-resize.pod
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ $(top_builddir)/podwrapper.sh \
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ --man virt-resize.1 \
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ --html $(top_builddir)/html/virt-resize.1.html \
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ $<
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ touch $@
+ at HAVE_OCAML_TRUE@stamp-virt-resize.pod: virt-resize.pod
+ at HAVE_OCAML_TRUE@ $(top_builddir)/podwrapper.sh \
+ at HAVE_OCAML_TRUE@ --man virt-resize.1 \
+ at HAVE_OCAML_TRUE@ --html $(top_builddir)/html/virt-resize.1.html \
+ at HAVE_OCAML_TRUE@ $<
+ at HAVE_OCAML_TRUE@ touch $@
+
+ at HAVE_OCAML_TRUE@utils_tests: utils.cmx utils_tests.cmx
+ at HAVE_OCAML_TRUE@ $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \
+ at HAVE_OCAML_TRUE@ mlguestfs.cmxa -linkpkg $^ -cclib -lncurses -o $@
# Dependencies.
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at depend: .depend
-
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at .depend: $(wildcard *.mli) $(wildcard *.ml)
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ rm -f $@ $@-t
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ $(OCAMLFIND) ocamldep -I ../ocaml $^ | \
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ $(SED) 's/ *$$//' | \
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ sort > $@-t
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE@ mv $@-t $@
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at progress.cmi: ../ocaml/guestfs.cmi
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at progress.cmo: utils.cmo ../ocaml/guestfs.cmi progress.cmi
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at progress.cmx: utils.cmx ../ocaml/guestfs.cmx progress.cmi
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at resize.cmo: utils.cmo progress.cmi ../ocaml/guestfs.cmi
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at resize.cmx: utils.cmx progress.cmx ../ocaml/guestfs.cmx
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at utils.cmo: ../ocaml/guestfs.cmi
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at utils.cmx: ../ocaml/guestfs.cmx
-
- at HAVE_OCAML_PCRE_TRUE@@HAVE_OCAML_TRUE at .PHONY: depend docs
+ at HAVE_OCAML_TRUE@depend: .depend
+
+ at HAVE_OCAML_TRUE@.depend: $(wildcard *.mli) $(wildcard *.ml)
+ at HAVE_OCAML_TRUE@ rm -f $@ $@-t
+ at HAVE_OCAML_TRUE@ $(OCAMLFIND) ocamldep -I ../ocaml $^ | \
+ at HAVE_OCAML_TRUE@ $(SED) 's/ *$$//' | \
+ at HAVE_OCAML_TRUE@ $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \
+ at HAVE_OCAML_TRUE@ sort > $@-t
+ at HAVE_OCAML_TRUE@ mv $@-t $@
+ at HAVE_OCAML_TRUE@progress.cmi: ../ocaml/guestfs.cmi
+ at HAVE_OCAML_TRUE@progress.cmo: utils.cmo ../ocaml/guestfs.cmi progress.cmi
+ at HAVE_OCAML_TRUE@progress.cmx: utils.cmx ../ocaml/guestfs.cmx progress.cmi
+ at HAVE_OCAML_TRUE@resize.cmo: utils.cmo progress.cmi ../ocaml/guestfs.cmi
+ at HAVE_OCAML_TRUE@resize.cmx: utils.cmx progress.cmx ../ocaml/guestfs.cmx
+ at HAVE_OCAML_TRUE@utils.cmo: ../ocaml/guestfs.cmi
+ at HAVE_OCAML_TRUE@utils.cmx: ../ocaml/guestfs.cmx
+ at HAVE_OCAML_TRUE@utils_tests.cmo: utils.cmo
+ at HAVE_OCAML_TRUE@utils_tests.cmx: utils.cmx
+
+ at HAVE_OCAML_TRUE@.PHONY: depend docs
# Parallel builds don't obey dependencies for some reason we
# don't understand.
diff --git a/resize/utils.ml b/resize/utils.ml
index dc134be..c11740f 100644
--- a/resize/utils.ml
+++ b/resize/utils.ml
@@ -102,23 +102,16 @@ let feature_available (g : Guestfs.guestfs) names =
(* Parse the size field from --resize and --resize-force options. *)
let parse_size =
- let const_re = Pcre.regexp "^([.\\d]+)([bKMG])$"
- and plus_const_re = Pcre.regexp "^\\+([.\\d]+)([bKMG])$"
- and minus_const_re = Pcre.regexp "^-([.\\d]+)([bKMG])$"
- and percent_re = Pcre.regexp "^([.\\d]+)%$"
- and plus_percent_re = Pcre.regexp "^\\+([.\\d]+)%$"
- and minus_percent_re = Pcre.regexp "^-([.\\d]+)%$"
+ let const_re = Str.regexp "^\\([.0-9]+\\)\\([bKMG]\\)$"
+ and plus_const_re = Str.regexp "^\\+\\([.0-9]+\\)\\([bKMG]\\)$"
+ and minus_const_re = Str.regexp "^-\\([.0-9]+\\)\\([bKMG]\\)$"
+ and percent_re = Str.regexp "^\\([.0-9]+\\)%$"
+ and plus_percent_re = Str.regexp "^\\+\\([.0-9]+\\)%$"
+ and minus_percent_re = Str.regexp "^-\\([.0-9]+\\)%$"
in
fun oldsize field ->
- let subs = ref None in
- let matches rex =
- try subs := Some (Pcre.exec ~rex field); true
- with Not_found -> false
- in
- let sub i =
- match !subs with None -> assert false
- | Some subs -> Pcre.get_substring subs i
- in
+ let matches rex = Str.string_match rex field 0 in
+ let sub i = Str.matched_group i field in
let size_scaled f = function
| "b" -> Int64.of_float f
| "K" -> Int64.of_float (f *. 1024.)
diff --git a/resize/utils_tests.ml b/resize/utils_tests.ml
new file mode 100644
index 0000000..9356d7b
--- /dev/null
+++ b/resize/utils_tests.ml
@@ -0,0 +1,87 @@
+(* virt-resize
+ * Copyright (C) 2011 Red Hat Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *)
+
+(* This file tests the Utils module. *)
+
+open Utils
+
+(* Test Utils.int_of_le32 and Utils.le32_of_int. *)
+let () =
+ assert (int_of_le32 "\x80\x60\x40\x20" = 0x20406080L);
+ assert (le32_of_int 0x20406080L = "\x80\x60\x40\x20")
+
+(* Test Utils.canonicalize. *)
+let () =
+ assert (canonicalize "/dev/vda" = "/dev/sda");
+ assert (canonicalize "/dev/hda3" = "/dev/sda3");
+ assert (canonicalize "/dev/sda4" = "/dev/sda4");
+ assert (canonicalize "/dev/hdaa" = "/dev/sdaa");
+ assert (canonicalize "/dev/sdaa" = "/dev/sdaa");
+ assert (canonicalize "/dev/cciss/c0d0p1" = "/dev/cciss/c0d0p1")
+
+(* Test Utils.parse_size. *)
+let () =
+ (* For absolute sizes, oldsize is ignored. *)
+ assert (parse_size 100_L "100b" = 100_L);
+ assert (parse_size 1000_L "100b" = 100_L);
+ assert (parse_size 10000_L "100b" = 100_L);
+ assert (parse_size 100_L "100K" = 102400_L);
+ (* Fractions are always rounded down. *)
+ assert (parse_size 100_L "1.1K" = 1126_L);
+ assert (parse_size 100_L "100.1M" = 104962457_L);
+ assert (parse_size 100_L "123.4G" = 132499741081_L);
+
+ (* oldsize +/- a constant. *)
+ assert (parse_size 100_L "+1b" = 101_L);
+ assert (parse_size 100_L "-2b" = 98_L);
+ assert (parse_size 100_L "+1K" = 1124_L);
+ assert (parse_size 1024_L "-1K" = 0_L);
+ assert (parse_size 1126_L "-1.1K" = 0_L);
+ assert (parse_size 1024_L "+1.1M" = 1154457_L);
+ assert (parse_size 132499741081_L "-123.3G" = 107374182_L);
+
+ (* oldsize +/- a percentage. *)
+ assert (parse_size 100_L "+1%" = 101_L);
+ assert (parse_size 100_L "-1%" = 99_L);
+ assert (parse_size 100000_L "+1%" = 101000_L);
+ assert (parse_size 100000_L "-1%" = 99000_L);
+ assert (parse_size 100000_L "+50%" = 150000_L);
+ assert (parse_size 100000_L "-50%" = 50000_L);
+ assert (parse_size 100000_L "+100%" = 200000_L);
+ assert (parse_size 100000_L "-100%" = 0_L);
+ assert (parse_size 100000_L "+200%" = 300000_L);
+ assert (parse_size 100000_L "+300%" = 400000_L);
+
+ (* Implementation rounds numbers so that only a single digit after
+ * the decimal point is significant.
+ *)
+ assert (parse_size 100000_L "+1.1%" = 101100_L);
+ assert (parse_size 100000_L "+1.12%" = 101100_L)
+
+(* Test Utils.human_size. *)
+let () =
+ assert (human_size 100_L = "100");
+ assert (human_size (-100_L) = "-100");
+ assert (human_size 1024_L = "1.0K");
+ assert (human_size (-1024_L) = "-1.0K");
+ assert (human_size 1126_L = "1.1K");
+ assert (human_size (-1126_L) = "-1.1K");
+ assert (human_size 1363149_L = "1.3M");
+ assert (human_size (-1363149_L) = "-1.3M");
+ assert (human_size 3650722201_L = "3.4G");
+ assert (human_size (-3650722201_L) = "-3.4G")
diff --git a/ruby/Makefile.in b/ruby/Makefile.in
index 8a8431d..3c1a989 100644
--- a/ruby/Makefile.in
+++ b/ruby/Makefile.in
@@ -927,7 +927,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/ruby/examples/Makefile.in b/ruby/examples/Makefile.in
index e1ac4cb..6cd0ff0 100644
--- a/ruby/examples/Makefile.in
+++ b/ruby/examples/Makefile.in
@@ -934,7 +934,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/sparsify/Makefile.in b/sparsify/Makefile.in
index 21c8e80..2cc989e 100644
--- a/sparsify/Makefile.in
+++ b/sparsify/Makefile.in
@@ -957,7 +957,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/src/Makefile.in b/src/Makefile.in
index f558689..25cd69e 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1023,7 +1023,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/test-tool/Makefile.in b/test-tool/Makefile.in
index 39965d4..d50db0d 100644
--- a/test-tool/Makefile.in
+++ b/test-tool/Makefile.in
@@ -986,7 +986,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 3d20041..51910c1 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -956,7 +956,6 @@ OCAMLMKTOP = @OCAMLMKTOP@
OCAMLOPT = @OCAMLOPT@
OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@
OCAMLVERSION = @OCAMLVERSION@
-OCAML_PKG_pcre = @OCAML_PKG_pcre@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list