[PATCH] xfs: add a new api xfs_repair
by Wanlong Gao
Add a new api xfs_repair for repairing an XFS filesystem.
Signed-off-by: Wanlong Gao <gaowanlong(a)cn.fujitsu.com>
---
daemon/xfs.c | 116 +++++++++++++++++++++++++++++++++++++++++
generator/generator_actions.ml | 23 ++++++++
gobject/Makefile.inc | 6 ++-
po/POTFILES | 1 +
src/MAX_PROC_NR | 2 +-
5 files changed, 145 insertions(+), 3 deletions(-)
diff --git a/daemon/xfs.c b/daemon/xfs.c
index 12ed600..8a86f93 100644
--- a/daemon/xfs.c
+++ b/daemon/xfs.c
@@ -536,3 +536,119 @@ error:
free (err);
return -1;
}
+
+int
+do_xfs_repair (const char *device,
+ int imgfile, int forcelogzero, int dangerous,
+ int nomodify, int noprefetch, int forcegeometry,
+ int64_t maxmem, int64_t ihashsize,
+ int64_t bhashsize, int64_t agstride,
+ const char *logdev, const char *rtdev)
+{
+ int r;
+ char *err = NULL;
+ const char *argv[MAX_ARGS];
+ char maxmem_s[64];
+ char ihashsize_s[70];
+ char bhashsize_s[70];
+ char agstride_s[74];
+ size_t i = 0;
+
+ ADD_ARG (argv, i, "xfs_repair");
+
+ /* Optional arguments */
+ if (!(optargs_bitmask & GUESTFS_XFS_REPAIR_IMGFILE_BITMASK))
+ imgfile = 0;
+ if (!(optargs_bitmask & GUESTFS_XFS_REPAIR_FORCELOGZERO_BITMASK))
+ forcelogzero = 0;
+ if (!(optargs_bitmask & GUESTFS_XFS_REPAIR_DANGEROUS_BITMASK))
+ dangerous = 0;
+ if (!(optargs_bitmask & GUESTFS_XFS_REPAIR_NOMODIFY_BITMASK))
+ nomodify = 0;
+ if (!(optargs_bitmask & GUESTFS_XFS_REPAIR_NOPREFETCH_BITMASK))
+ noprefetch = 0;
+ if (!(optargs_bitmask & GUESTFS_XFS_REPAIR_FORCEGEOMETRY_BITMASK))
+ forcegeometry = 0;
+
+ if (imgfile)
+ ADD_ARG (argv, i, "-f");
+ if (forcelogzero)
+ ADD_ARG (argv, i, "-L");
+ if (dangerous)
+ ADD_ARG (argv, i, "-d");
+ if (nomodify)
+ ADD_ARG (argv, i, "-n");
+ if (noprefetch)
+ ADD_ARG (argv, i, "-P");
+ if (forcegeometry) {
+ ADD_ARG (argv, i, "-o");
+ ADD_ARG (argv, i, "force_geometry");
+ }
+
+ if (optargs_bitmask & GUESTFS_XFS_REPAIR_MAXMEM_BITMASK) {
+ if (maxmem < 0) {
+ reply_with_error ("maxmem must be >= 0");
+ goto error;
+ }
+ snprintf(maxmem_s, sizeof maxmem_s, "%" PRIi64, maxmem);
+ ADD_ARG (argv, i, "-m");
+ ADD_ARG (argv, i, maxmem_s);
+ }
+
+ if (optargs_bitmask & GUESTFS_XFS_REPAIR_IHASHSIZE_BITMASK) {
+ if (ihashsize < 0) {
+ reply_with_error ("ihashsize must be >= 0");
+ goto error;
+ }
+ snprintf(ihashsize_s, sizeof ihashsize_s, "ihash=" "%" PRIi64, ihashsize);
+ ADD_ARG (argv, i, "-o");
+ ADD_ARG (argv, i, ihashsize_s);
+ }
+
+ if (optargs_bitmask & GUESTFS_XFS_REPAIR_BHASHSIZE_BITMASK) {
+ if (bhashsize < 0) {
+ reply_with_error ("bhashsize must be >= 0");
+ goto error;
+ }
+ snprintf(bhashsize_s, sizeof bhashsize_s, "bhash=" "%" PRIi64, bhashsize);
+ ADD_ARG (argv, i, "-o");
+ ADD_ARG (argv, i, bhashsize_s);
+ }
+
+ if (optargs_bitmask & GUESTFS_XFS_REPAIR_AGSTRIDE_BITMASK) {
+ if (agstride < 0) {
+ reply_with_error ("agstride must be >= 0");
+ goto error;
+ }
+ snprintf(agstride_s, sizeof agstride_s, "ag_stride=" "%" PRIi64, agstride);
+ ADD_ARG (argv, i, "-o");
+ ADD_ARG (argv, i, agstride_s);
+ }
+
+
+ if (optargs_bitmask & GUESTFS_XFS_REPAIR_LOGDEV_BITMASK) {
+ ADD_ARG (argv, i, "-l");
+ ADD_ARG (argv, i, logdev);
+ }
+
+ if (optargs_bitmask & GUESTFS_XFS_REPAIR_RTDEV_BITMASK) {
+ ADD_ARG (argv, i, "-r");
+ ADD_ARG (argv, i, rtdev);
+ }
+
+ ADD_ARG (argv, i, device);
+ ADD_ARG (argv, i, NULL);
+
+ r = commandv (NULL, &err, argv);
+ if (r == -1) {
+ reply_with_error ("%s: %s", device, err);
+ goto error;
+ }
+
+ free (err);
+ return 0;
+
+error:
+ if (err) free (err);
+ return -1;
+}
diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml
index 562f785..98a894c 100644
--- a/generator/generator_actions.ml
+++ b/generator/generator_actions.ml
@@ -9453,6 +9453,29 @@ Devices that are mounted cannot be modified. Administrators must unmount
filesystems before C<xfs_admin> can convert parameters. A number of parameters
of a mounted filesystem can be examined and modified using the C<xfs_growfs>." };
+ { defaults with
+ name = "xfs_repair";
+ style = RErr, [Device "device"], [OBool "imgfile"; OBool "forcelogzero"; OBool "dangerous"; OBool "nomodify"; OBool "noprefetch"; OBool "forcegeometry"; OInt64 "maxmem"; OInt64 "ihashsize"; OInt64 "bhashsize"; OInt64 "agstride"; OString "logdev"; OString "rtdev"];
+ proc_nr = Some 350;
+ optional = Some "xfs";
+ tests = [
+ InitEmpty, IfAvailable "xfs", TestRun (
+ [["part_disk"; "/dev/sda"; "mbr"];
+ ["mkfs"; "xfs"; "/dev/sda1"; ""; "NOARG"; ""; ""];
+ ["xfs_repair"; ""; ""; ""; "true"; ""; ""; ""; ""; ""; ""; ""; ""; "/dev/sda1"]
+ ])
+ ];
+ shortdesc = "repair an XFS filesystem";
+ longdesc = "\
+C<xfs_repair> repairs corrupt or damaged XFS filesystems. The filesystem is
+specified using the C<device> argument which should be the device name of the
+disk partition or volume containing the filesystem. If given the name of a
+block device, C<xfs_repair> will attempt to find the raw device associated
+with the specified block device and will use the raw device instead.
+
+Regardless, the filesystem to be repaired must be unmounted, otherwise,
+the resulting filesystem may be inconsistent or corrupt." };
+
]
(* Non-API meta-commands available only in guestfish.
diff --git a/gobject/Makefile.inc b/gobject/Makefile.inc
index 9f81cd2..4dfa0bf 100644
--- a/gobject/Makefile.inc
+++ b/gobject/Makefile.inc
@@ -73,7 +73,8 @@ guestfs_gobject_headers= \
include/guestfs-gobject/optargs-rsync.h \
include/guestfs-gobject/optargs-rsync_in.h \
include/guestfs-gobject/optargs-rsync_out.h \
- include/guestfs-gobject/optargs-xfs_admin.h
+ include/guestfs-gobject/optargs-xfs_admin.h \
+ include/guestfs-gobject/optargs-xfs_repair.h
guestfs_gobject_sources= \
src/session.c \
@@ -128,4 +129,5 @@ guestfs_gobject_sources= \
src/optargs-rsync.c \
src/optargs-rsync_in.c \
src/optargs-rsync_out.c \
- src/optargs-xfs_admin.c
+ src/optargs-xfs_admin.c \
+ src/optargs-xfs_repair.c
diff --git a/po/POTFILES b/po/POTFILES
index d961ac1..727438b 100644
--- a/po/POTFILES
+++ b/po/POTFILES
@@ -169,6 +169,7 @@ gobject/src/optargs-umount.c
gobject/src/optargs-umount_local.c
gobject/src/optargs-xfs_admin.c
gobject/src/optargs-xfs_growfs.c
+gobject/src/optargs-xfs_repair.c
gobject/src/session.c
gobject/src/struct-application.c
gobject/src/struct-btrfssubvolume.c
diff --git a/src/MAX_PROC_NR b/src/MAX_PROC_NR
index aef2e27..0fecf65 100644
--- a/src/MAX_PROC_NR
+++ b/src/MAX_PROC_NR
@@ -1 +1 @@
-349
+350
--
1.7.12
12 years, 2 months
[PATCH] remove ulockmgr from fuse LDFLAGS
by Olaf Hering
libguestfs fails to build with --enable-fuse on openSuSE 11.4 and
earlier because the included fuse version does not include
libulockmgr.so. configure already used pkgconfig to retrieve the correct
CFLAGS, so there is no need to hardcode -lulockmgr.
With this change the build succeeds again.
Signed-off-by: Olaf Hering <olaf(a)aepfle.de>
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 35bf765..4bfa85d 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -86,7 +86,7 @@ mount_local_CFLAGS = \
$(FUSE_CFLAGS) \
$(WARN_CFLAGS) $(WERROR_CFLAGS)
mount_local_LDADD = \
- $(FUSE_LIBS) -lulockmgr \
+ $(FUSE_LIBS) \
$(top_builddir)/src/libguestfs.la
endif
diff --git a/fuse/Makefile.am b/fuse/Makefile.am
index 079755b..1295298 100644
--- a/fuse/Makefile.am
+++ b/fuse/Makefile.am
@@ -51,7 +51,7 @@ guestmount_CFLAGS = \
$(WARN_CFLAGS) $(WERROR_CFLAGS)
guestmount_LDADD = \
- $(FUSE_LIBS) -lulockmgr \
+ $(FUSE_LIBS) \
$(LIBCONFIG_LIBS) \
$(top_builddir)/src/libguestfs.la \
../gnulib/lib/libgnu.la
diff --git a/src/Makefile.am b/src/Makefile.am
index 4d85747..97905bf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -177,7 +177,7 @@ libguestfs_la_CPPFLAGS = -I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib
if HAVE_FUSE
# XXX Unfortunately FUSE_CFLAGS defines _FILE_OFFSET_BITS=64.
libguestfs_la_CFLAGS += $(FUSE_CFLAGS)
-libguestfs_la_LIBADD += $(FUSE_LIBS) -lulockmgr
+libguestfs_la_LIBADD += $(FUSE_LIBS)
endif
if HAVE_RPCGEN
diff --git a/tests/mount-local/Makefile.am b/tests/mount-local/Makefile.am
index 384eb2d..d0c1cf8 100644
--- a/tests/mount-local/Makefile.am
+++ b/tests/mount-local/Makefile.am
@@ -34,7 +34,7 @@ test_parallel_mount_local_CFLAGS = \
$(FUSE_CFLAGS) \
$(WARN_CFLAGS) $(WERROR_CFLAGS)
test_parallel_mount_local_LDADD = \
- $(FUSE_LIBS) -lulockmgr \
+ $(FUSE_LIBS) \
$(top_builddir)/src/libguestfs.la
endif
--
1.7.11.5
12 years, 2 months
[PATCH 0/4] Add hivex APIs into the libguestfs API (RHBZ#852394)
by Richard W.M. Jones
This adds most of the hivex APIs directly to the libguestfs API, so
that you can read and write Windows Registry hive files from
libguestfs without needing to download and upload hive files from the
guest.
This is analogous to how Augeas APIs are exposed already
(guestfs_aug_*)
Also, inspection is now done using the new APIs, which fixes the
following bug:
https://bugzilla.redhat.com/show_bug.cgi?id=852394
"libguestfs inspection limits registries to 100 MiB"
I tested this by:
(a) Running virt-inspector before and after over a set of test Windows
guests. There was no difference in the output.
(b) Running 'make check' and 'make extra-tests'. These tests are
still running. If they succeed (particularly extra-tests which uses
valgrind) then that should give us high confidence there are no memory
errors.
Rich.
12 years, 2 months
"make distcheck" failure
by Jim Meyering
Hi Rich,
I ran these commands as non-root:
./autogen.sh && make && make distcheck
It got most of the way through, but failed in the VPATH part
while rebuilding from a ./_build subdir, like this:
make[4]: Entering directory `/h/j/w/co/hivex/hivex-1.3.6/_build/ocaml'
mkdir -p /usr/lib64/ocaml
mkdir -p /usr/lib64/ocaml/stublibs
ocamlfind install \
-ldconf ignore -destdir /usr/lib64/ocaml \
hivex \
META *.so *.a *.cma *.cmi ../../ocaml/*.mli *.cmx *.cmxa
ocamlfind: Cannot mkdir /usr/lib64/ocaml/hivex: Permission denied
make[4]: *** [install-data-hook] Error 2
make[4]: Leaving directory `/h/j/w/co/hivex/hivex-1.3.6/_build/ocaml'
make[3]: *** [install-data-am] Error 2
make[3]: Leaving directory `/h/j/w/co/hivex/hivex-1.3.6/_build/ocaml'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/h/j/w/co/hivex/hivex-1.3.6/_build/ocaml'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/h/j/w/co/hivex/hivex-1.3.6/_build'
make: *** [distcheck] Error 1
Obviously, it should not be trying to create directories under /usr.
12 years, 2 months
[PATCH hivex] maint: remove unnecessary mkdir -p
by Jim Meyering
Does hivex have a trivial-patch policy?
>From e23c45a2f813ac29b022faa9112c1977b651862f Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Tue, 28 Aug 2012 17:34:26 +0200
Subject: [PATCH hivex] maint: remove unnecessary mkdir -p
* ocaml/Makefile.am (install-data-hook): Remove unneeded mkdir -p.
It's job is handled by the very next mkdir -p.
---
ocaml/Makefile.am | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am
index eb49431..2c08be7 100644
--- a/ocaml/Makefile.am
+++ b/ocaml/Makefile.am
@@ -1,5 +1,5 @@
# hivex OCaml bindings
-# Copyright (C) 2009-2010 Red Hat Inc.
+# Copyright (C) 2009-2010, 2012 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
@@ -97,7 +97,6 @@ install_files += *.cmx *.cmxa
endif
install-data-hook:
- mkdir -p $(DESTDIR)$(OCAMLLIB)
mkdir -p $(DESTDIR)$(OCAMLLIB)/stublibs
$(OCAMLFIND) install \
-ldconf ignore -destdir $(DESTDIR)$(OCAMLLIB) \
--
1.7.12.116.g31e0100
12 years, 2 months
[PATCH hivex 1/2] maint: avoid some syntax-check test failures
by Jim Meyering
Hi Rich,
I've updated hivex to use the latest from gnulib
and fixed a few syntax-check failures.
With these changes, almost all of "make distcheck" succeeds.
(details coming separately)
>From c6300c44a1eda1a55a23249fde94882ea5a1c430 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Tue, 28 Aug 2012 11:28:40 +0200
Subject: [PATCH hivex 1/2] maint: avoid some syntax-check test failures
* cfg.mk (_img_regexp): Exempt two VC'd image files from syntax
check rules that look for trailing blanks and empty lines at EOF.
* sh/hivexsh.pod: Remove trailing spaces.
---
cfg.mk | 7 +++++--
sh/hivexsh.pod | 24 ++++++++++++------------
2 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index c1334fe..528f722 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -14,8 +14,11 @@ gnulib_dir = .gnulib
exclude_file_name_regexp--sc_trailing_blank = \
^sh/hivexsh\.pod$$
-exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
- ^images/minimal$$
+_img_regexp = ^images/(minimal|rlenvalue_test_hive)$$
+exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = $(_img_regexp)
+exclude_file_name_regexp--sc_trailing_blank = $(_img_regexp)
exclude_file_name_regexp--sc_useless_cpp_parens = \
^lib/gettext\.h$$
+
+config_h_header ?= ["<](hivex|config)\.h[>"]
diff --git a/sh/hivexsh.pod b/sh/hivexsh.pod
index a31d9e0..7d7fc0a 100644
--- a/sh/hivexsh.pod
+++ b/sh/hivexsh.pod
@@ -30,13 +30,13 @@ Or you can start C<hivexsh> without any arguments, and immediately use
the C<load> command to load a hive:
$ hivexsh
-
+
Welcome to hivexsh, the hivex interactive shell for examining
Windows Registry binary hive files.
-
+
Type: 'help' for help with commands
'quit' to quit the shell
-
+
> load software
software\>
@@ -198,22 +198,22 @@ The second line of each pair is the value, which has a special format
C<type:value> with possible types summarized in the table below:
none No data is stored, and the type is set to 0.
-
+
string:abc "abc" is stored as a UTF16-LE-encoded
string (type 1). Note that only 7 bit
ASCII strings are supported as input.
-
+
expandstring:... Same as string but with type 2.
-
+
dword:0x01234567 A DWORD (type 4) with the hex value
0x01234567. You can also use decimal
or octal numbers here.
-
+
qword:0x0123456789abcdef
A QWORD (type 11) with the hex value
0x0123456789abcdef. You can also use
decimal or octal numbers here.
-
+
hex:<type>:<hexbytes>
hex:1:41,00,42,00,43,00,44,00,00,00
This is the generic way to enter any
@@ -231,15 +231,15 @@ C<type:value> with possible types summarized in the table below:
$ guestfish --ro -i Windows7
><fs> download win:c:\windows\system32\config\software software
><fs> quit
-
+
$ hivexsh software
-
+
Welcome to hivexsh, the hivex interactive shell for examining
Windows Registry binary hive files.
-
+
Type: 'help' for help with commands
'quit' to quit the shell
-
+
software\> ls
ATI Technologies
Classes
--
1.7.12.116.g31e0100
>From 95fe2b195f230115a5f716fb65b6bcb1856cda6e Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Tue, 28 Aug 2012 11:00:36 +0200
Subject: [PATCH hivex 2/2] build: update gnulib submodule to latest
---
.gnulib | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.gnulib b/.gnulib
index 1f96aa0..68f693f 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit 1f96aa01f72bba8c9a0600280594a1a92bb505fc
+Subproject commit 68f693ff1db33bf24695f0f42c62e7801966fd06
--
1.7.12.116.g31e0100
12 years, 2 months
virt-v2v trouble converting Xen Centos 5.X to KVM Centos 6.3 or Fedora 17
by Alan Low
Hi! I'm trying to convert some Xen guests running Centos 5.8 to KVM on Centos 6.3. Hopefully this is the right place to ask this question, if not, let me know and I'll go there instead! :)
My setup: Centos 5.8 Host running Xen with a Centos 5.8 guest, and I want to transfer this guest to a different Centos 6.3 host running KVM. I am able to tweak the target server all I want, but the source server is not really upgradeable which is why I'm trying to do this in the first place. :)
Command I am running:
virt-v2v -ic xen+ssh://root@app1.bur.sol -o libvirt -os vg5 --bridge br0 alan2
When I ran this on the Centos 6.3 target, the ssh transfer of the 20G disk image took about 10 mins and then I saw this error:
"febootstrap-supermin-helper: ext2: parent directory not found: File not found by ext2_lookup" I did some searching and saw someone else had this problem on an ubuntu setup who guessed that febootstrap was below version. Since I was able to wipe the target server all I wanted I jumped way ahead to Fedora 17 which had febootstrap-supermin-helper-3.18-1.fc17.x86_64 and libguestfs-1.18.6-3.fc17.x86_64.
So now on my new Fedora 17 target, I get a totally different error. It appears the transfer of the disk image goes fine (that's the 100% progress bar), but then I get a bunch of error messages I don't understand, and I check and the logical volume under the vg5 pool has been deleted once the script exits.
vm-alan2: 100% [=====================================================]D 0h08m16s
Use of uninitialized value $transferdev in quotemeta at /bin/virt-v2v line 609.
Use of qw(...) as parentheses is deprecated at /usr/share/perl5/vendor_perl/Sys/VirtConvert/Converter/RedHat.pm line 169.
Use of qw(...) as parentheses is deprecated at /usr/share/perl5/vendor_perl/Sys/VirtConvert/Converter/RedHat.pm line 178.
Use of qw(...) as parentheses is deprecated at /usr/share/perl5/vendor_perl/Sys/VirtConvert/Converter/RedHat.pm line 230.
Use of qw(...) as parentheses is deprecated at /usr/share/perl5/vendor_perl/Sys/VirtConvert/Converter/RedHat.pm line 252.
umount: umount: /transfer4b5GFf: umount: /sysroot/transfer4b5GFf: not mounted at /usr/share/perl5/vendor_perl/Sys/VirtConvert/GuestfsHandle.pm line 193.
at /usr/share/perl5/vendor_perl/Sys/VirtConvert/Config.pm line 262
I re-ran the command setting LIBGUESTFS_TRACE=1 and LIBGUESTFS_DEBUG=1, and there is about 144K of output I that looks like an operating system booting up, examination of lots of directores in long format, and the section that has the error looks like this:
guestfsd: main_loop: new request, len 0x3c
umount /sysroot/transferaherpD
umount: /sysroot/transferaherpD: not mounted
guestfsd: error: /transferaherpD: umount: /sysroot/transferaherpD: not mounted
libguestfs: recv_from_daemon: 112 bytes: 20 00 f5 f5 | 00 00 00 04 | 00 00 00 2d
| 00 00 00 01 | 00 12 34 df | ...
libguestfs: trace: umount = -1 (error)
libguestfs: trace: close
libguestfs: closing guestfs handle 0x3302d70 (state 2)
libguestfs: trace: shutdown
libguestfs: trace: internal_autosync
libguestfs: send_to_daemon: 44 bytes: 00 00 00 28 | 20 00 f5 f5 | 00 00 00 04 |
00 00 01 1a | 00 00 00 00 | ...
guestfsd: main_loop: proc 45 (umount) took 0.01 seconds
guestfsd: main_loop: new request, len 0x28
umount /sysroot/local
umount /sysroot/boot
umount /sysroot/home
umount /sysroot/usr
umount /sysroot/tmp
umount /sysroot/pkg
umount /sysroot/var
umount /sysroot
fsync /dev/sda
libguestfs: recv_from_daemon: 40 bytes: 20 00 f5 f5 | 00 00 00 04 | 00 00 01 1a
| 00 00 00 01 | 00 12 34 e0 | ...
libguestfs: trace: internal_autosync = 0
libguestfs: sending SIGTERM to process 5547
libguestfs: trace: shutdown = 0
umount: umount: /transferaherpD: umount: /sysroot/transferaherpD: not mounted at
/usr/share/perl5/vendor_perl/Sys/VirtConvert/GuestfsHandle.pm line 193.
at /usr/share/perl5/vendor_perl/Sys/VirtConvert/Config.pm line 262
virt-v2v: Transferring storage volume vm-alan2: 21474836480 bytes
The script then exits and I have no idea what I should do next. There is a 343M of new data created in /var/tmp/.guestfs-0 also, which I've cleaned up prior to each run.
Any suggestions on what I should try next? Thanks again for any assistance!
12 years, 2 months
[PATCH hivex] tests: avoid spurious failure when run in non-srcdir build
by Jim Meyering
Hi Rich,
I tried to run "make distcheck" and got a failed test.
This single line was in ocaml/t/hivex_120_rlenvalue.log:
Fatal error: exception Hivex.Error("open", 20, "No such file or directory")
This change got me past it:
>From b446a2bb7aea5f8dc2cf80c83f068dfd6abf3b7a Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Tue, 28 Aug 2012 11:39:51 +0200
Subject: [PATCH hivex] tests: avoid spurious failure when run in non-srcdir
build
* ocaml/t/hivex_120_rlenvalue.ml: Avoid spurious failure when the
test is run in a non-srcdir (aka VPATH) build. I.e., open a
$srcdir-relative name, rather than assuming $srcdir is ".".
---
ocaml/t/hivex_120_rlenvalue.ml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ocaml/t/hivex_120_rlenvalue.ml b/ocaml/t/hivex_120_rlenvalue.ml
index 63c4cb2..827dc46 100644
--- a/ocaml/t/hivex_120_rlenvalue.ml
+++ b/ocaml/t/hivex_120_rlenvalue.ml
@@ -1,5 +1,5 @@
(* hivex OCaml bindings
- * Copyright (C) 2009-2010 Red Hat Inc.
+ * Copyright (C) 2009-2010, 2012 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
@@ -26,9 +26,10 @@
open Unix
open Printf
let (//) = Filename.concat
+let srcdir = try Sys.getenv "srcdir" with Not_found -> "."
let () =
- let h = Hivex.open_file "../images/rlenvalue_test_hive" [] in
+ let h = Hivex.open_file (srcdir // "../images/rlenvalue_test_hive") [] in
let root = Hivex.root h in
let moderate_value_node = Hivex.node_get_child h root "ModerateValueParent" in
let moderate_value_value = Hivex.node_get_value h moderate_value_node "33Bytes" in
--
1.7.12.116.g31e0100
12 years, 2 months
[PATCH] Mac OS X: Fixed combination of running autogen.sh on Linux and building on Mac OS X
by Masami HIRATA
Signed-off-by: Masami HIRATA <msmhrt(a)gmail.com>
---
generator/generator_xdr.ml | 1 +
1 file changed, 1 insertion(+)
diff --git a/generator/generator_xdr.ml b/generator/generator_xdr.ml
index 9acea8f..ef9e0f2 100644
--- a/generator/generator_xdr.ml
+++ b/generator/generator_xdr.ml
@@ -40,6 +40,7 @@ let generate_xdr () =
generate_header CStyle LGPLv2plus;
(* This has to be defined to get around a limitation in Mac OS X's rpcgen. *)
+ pr "%%#include <config.h>\n";
pr "#if HAVE_XDR_U_INT64_T\n";
pr "#define uint64_t u_int64_t\n";
pr "%%#if HAVE_XDR_UINT64_T\n";
--
1.7.9.6 (Apple Git-31.1)
12 years, 2 months