[PATCH] NEW API: add new api btrfs-fsck
by Wanlong Gao
Add the new API btrfs-fsck to check the btrfs filesystem.
Btrfs is currently under heavy development, and not suitable for
any uses other than benchmarking and review. But it'll be useful
in the near future.
Signed-off-by: Wanlong Gao <gaowanlong(a)cn.fujitsu.com>
---
daemon/btrfs.c | 17 +++++++++++++++++
generator/generator_actions.ml | 11 +++++++++++
src/MAX_PROC_NR | 2 +-
3 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index ab3babc..62f07f3 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -619,3 +619,20 @@ do_btrfs_set_seeding (const char *device, int svalue)
free (err);
return r;
}
+
+int
+do_btrfs_fsck (const char *device)
+{
+ char *err;
+ int r;
+
+ r = commandr (NULL, &err, "btrfsck", device, NULL);
+ if (r == -1) {
+ reply_with_error ("%s: %s", device, err);
+ free (err);
+ return -1;
+ }
+
+ free (err);
+ return r;
+}
diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml
index fc2df42..33ffd6b 100644
--- a/generator/generator_actions.ml
+++ b/generator/generator_actions.ml
@@ -7232,6 +7232,17 @@ If C<devices> is an empty list, this does nothing.");
Enable or disable the seeding feature of a device that contains
a btrfs filesystem.");
+ ("btrfs_fsck", (RErr, [Device "device"], []), 332, [Optional "btrfs"],
+ [InitPartition, IfAvailable "btrfs", TestRun (
+ [["mkfs_btrfs"; "/dev/sda1"; ""; ""; "NOARG"; ""; "NOARG"; "NOARG"; ""; ""];
+ ["btrfs_fsck"; "/dev/sda1"]])],
+ "check a btrfs filesystem",
+ "\
+Used to check a btrfs filesystem, C<device> is the device file where the
+filesystem is stored.
+NOTE: Btrfs is currently under heavy development, and not suitable for any
+uses other than benchmarking and review.");
+
]
let all_functions = non_daemon_functions @ daemon_functions
diff --git a/src/MAX_PROC_NR b/src/MAX_PROC_NR
index ec6cab0..6f96da6 100644
--- a/src/MAX_PROC_NR
+++ b/src/MAX_PROC_NR
@@ -1 +1 @@
-331
+332
--
1.7.10
12 years, 6 months
[PATCH] gobject: remove old generated files further
by Wanlong Gao
also remove guestfs-gobject.c
Signed-off-by: Wanlong Gao <gaowanlong(a)cn.fujitsu.com>
---
gobject/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gobject/Makefile.am b/gobject/Makefile.am
index 4744cd2..be6d58e 100644
--- a/gobject/Makefile.am
+++ b/gobject/Makefile.am
@@ -38,7 +38,7 @@ EXTRA_DIST = \
# Remove the old generated files which were directly in the gobject/
# directory. These have now moved into gobject/src/
CLEANFILES = \
- guestfs-gobject-*.c *.o *.lo
+ guestfs-gobject*.c *.o *.lo
libname = libguestfs-gobject-1.0.la
--
1.7.10
12 years, 6 months
[PATCH] po: update POTFILES
by Wanlong Gao
Signed-off-by: Wanlong Gao <gaowanlong(a)cn.fujitsu.com>
---
po/POTFILES | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/po/POTFILES b/po/POTFILES
index 2b4b586..789279a 100644
--- a/po/POTFILES
+++ b/po/POTFILES
@@ -131,6 +131,45 @@ fish/time.c
fish/virt.c
format/format.c
fuse/guestmount.c
+gobject/guestfs-gobject-optargs-add_domain.c
+gobject/guestfs-gobject-optargs-add_drive_opts.c
+gobject/guestfs-gobject-optargs-btrfs_filesystem_resize.c
+gobject/guestfs-gobject-optargs-compress_device_out.c
+gobject/guestfs-gobject-optargs-compress_out.c
+gobject/guestfs-gobject-optargs-copy_device_to_device.c
+gobject/guestfs-gobject-optargs-copy_device_to_file.c
+gobject/guestfs-gobject-optargs-copy_file_to_device.c
+gobject/guestfs-gobject-optargs-copy_file_to_file.c
+gobject/guestfs-gobject-optargs-e2fsck.c
+gobject/guestfs-gobject-optargs-inspect_get_icon.c
+gobject/guestfs-gobject-optargs-md_create.c
+gobject/guestfs-gobject-optargs-mkfs_btrfs.c
+gobject/guestfs-gobject-optargs-mkfs_opts.c
+gobject/guestfs-gobject-optargs-mount_9p.c
+gobject/guestfs-gobject-optargs-mount_local.c
+gobject/guestfs-gobject-optargs-ntfsclone_out.c
+gobject/guestfs-gobject-optargs-ntfsfix.c
+gobject/guestfs-gobject-optargs-ntfsresize_opts.c
+gobject/guestfs-gobject-optargs-test0.c
+gobject/guestfs-gobject-optargs-tune2fs.c
+gobject/guestfs-gobject-optargs-umount_local.c
+gobject/guestfs-gobject-session.c
+gobject/guestfs-gobject-struct-application.c
+gobject/guestfs-gobject-struct-dirent.c
+gobject/guestfs-gobject-struct-inotify_event.c
+gobject/guestfs-gobject-struct-int_bool.c
+gobject/guestfs-gobject-struct-isoinfo.c
+gobject/guestfs-gobject-struct-lvm_lv.c
+gobject/guestfs-gobject-struct-lvm_pv.c
+gobject/guestfs-gobject-struct-lvm_vg.c
+gobject/guestfs-gobject-struct-mdstat.c
+gobject/guestfs-gobject-struct-partition.c
+gobject/guestfs-gobject-struct-stat.c
+gobject/guestfs-gobject-struct-statvfs.c
+gobject/guestfs-gobject-struct-version.c
+gobject/guestfs-gobject-struct-xattr.c
+gobject/guestfs-gobject-tristate.c
+gobject/guestfs-gobject.c
gobject/src/optargs-add_domain.c
gobject/src/optargs-add_drive_opts.c
gobject/src/optargs-btrfs_filesystem_resize.c
--
1.7.10
12 years, 6 months
[PATCH 1/2] TODO: add note for libblkid
by Wanlong Gao
Add the note about compatible in TODO for libblkid.
Signed-off-by: Wanlong Gao <gaowanlong(a)cn.fujitsu.com>
---
TODO | 3 +++
1 file changed, 3 insertions(+)
diff --git a/TODO b/TODO
index 3955552..d604d10 100644
--- a/TODO
+++ b/TODO
@@ -192,6 +192,9 @@ would make more sense to just use libblkid for this.
There are some places where we call out to the 'blkid' program. This
might be replaced by direct use of the library (if this is easier).
+But it is very hard to be compatible between RHEL6 and RHEL5 when
+using direct library.
+
Visualization
-------------
--
1.7.10
12 years, 6 months
guestfs_mount_local api test: have to 'mount' before calling it?
by Nok
Hi
I`ve been trying this guestfs_mount_local api for quite a few days,
but still can`t get over it.
Now it seems to have enter the fuse loop but have some problems with
'mount',
and stops at guestfs_mount_local_run(g).
Here`s corresponding code in the test program:
……
if(guestfs_mount_local(g,"/mnt/libg")==-1)
exit(EXIT_FAILURE);
else
guestfs_mount_local_run(g);
……
Below is a part of the debug dump information,
……
version = 1.17.40.Root device: /dev/vda1 (this is test output)
libguestfs: guestfs__mount_local: fuse_mount /mnt/libg
libguestfs: guestfs__mount_local: fuse_new
libguestfs: guestfs__mount_local: leaving fuse_mount_local
libguestfs: guestfs__mount_local_run: entering fuse_loop
libguestfs: send_to_daemon: 56 bytes: 00 00 00 34 | 20 00 f5 f5 | 00 00
00 04 | 00 00 00 35 | 00 00 00 00 | ...
guestfsd: main_loop: proc 11 (lvs) took 0.04 seconds
guestfsd: main_loop: new request, len 0x34
guestfsd: error: lstat_stub: you must call 'mount' first to mount the
root filesystem
guestfsd: main_loop: proc 53 (lstat) took 0.00 seconds
libguestfs: recv_from_daemon: 116 bytes: 20 00 f5 f5 | 00 00 00 04 | 00
00 00 35 | 00 00 00 01 | 00 12 34 36 | ...
libguestfs: error: lstat: lstat_stub: you must call 'mount' first to
mount the root filesystem
libguestfs: send_to_daemon: 56 bytes: 00 00 00 34 | 20 00 f5 f5 | 00 00
00 04 | 00 00 00 35 | 00 00 00 00 | ...
guestfsd: main_loop: new request, len 0x34
……
Any idea what might be wrong with it?the fuse?
Thanks
Nok
12 years, 6 months
Re: [Libguestfs] febootstrap, FYI
by Richard W.M. Jones
On Sun, May 13, 2012 at 12:03:11AM -0700, dan farmer wrote:
> Trying to upgrade to the latest stuff
>
> Make'ing/compiling febootstrap-3.14 on centos 6.2 (uname a = "Linux
> blackhol3 2.6.32-220.7.1.el6.x86_64 #1 SMP Wed Mar 7 00:52:02 GMT 2012
> x86_64 x86_64 x86_64 GNU/Linux"), I was getting an error:
>
> > make[2]: Entering directory `/home/zen/src/virtual/febootstrap-3.14/helper'
> > gcc -std=gnu99 -static -g -O2 -static -o init init-init.o -lz /usr/bin/ld:
> > cannot find -lc collect2: ld returned 1 exit status make[2]: *** [init] Error
> > 1
> >
> You say in the README:
>
> > libcom_err
> > libext2fs
> > /sbin/mke2fs
> > - These are part of e2fsprogs.
> >
> Apparently not, at least on my sys; I have that installed:
>
> > yum install 'e2fsprogs*86_64'
> > Loaded plugins: fastestmirror, presto, priorities, refresh-packagekit,
> > security
> > Loading mirror speeds from cached hostfile
> > * base: mirrors.ecvps.com
> > * extras: mirrors.cat.pdx.edu
> > * kernel-xen: us1.mirror.crc.id.au
> > * nux-libreoffice: mirror.li.nux.ro
> > * rpmforge: apt.sw.be
> > * updates: mirrors.arsc.edu
> > Setting up Install Process
> > Package e2fsprogs-libs-1.41.12-11.el6.x86_64 already installed and latest
> > version
> > Package e2fsprogs-devel-1.41.12-11.el6.x86_64 already installed and latest
> > version
> > Package e2fsprogs-1.41.12-11.el6.x86_64 already installed and latest version
> > Nothing to do
> >
> Turns out that I need glibc-static (or, rather, glibc-static.x86_64
> 0:2.12-1.47.el6_2.12); found this in:
>
> http://www.cyberciti.biz/faq/centos-rhel-redhat-usrbinld-cannot-findlc-error
> /
>
> After yum'ing that the make went cleanly forward. In any case, FYI, in
> case you're tracking such things (ignore if not interested, abberation,
> etc.)
I'm providing febootstrap (3.12) source and binaries here:
http://people.redhat.com/~rjones/libguestfs-RHEL-6.3-preview/
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
12 years, 6 months
get virtual machine`s ip address
by THO HUYNH
I`ve tried to install virt-ifconfig as well as virt-tools but failed.
Is there a tool that can list all running virtual machines`s ip address like virt-ifconfig ?
I`m using Fedora 16.
Thanks.
12 years, 6 months
Re: Re: guestfs_mount_local* api undefined symbols
by Nok
the 'hivex' had been installed actually, hivex.x86_64 0:1.2.4-3.el6 and perl-hivex.x86_64 0:1.2.4-3.el6,
however it just could not be detected.Maybe i should compile one rather than just yum.
I`m not familiar with hivex,as far as i know, it can be used to modify windows registry,
but why the inspection API had been binded with hivex when we might use inspection api
solely with linux os instance image?
Nok
------------------ 原始邮件 ------------------
发件人: "Richard W.M. Jones"<rjones(a)redhat.com>;
发送时间: 2012年5月11日(星期五) 凌晨1:19
收件人: "Nok"<leolc_2749(a)qq.com>;
抄送: "libguestfs"<libguestfs(a)redhat.com>;
主题: Re: 回复: [Libguestfs] guestfs_mount_local* api undefined symbols
On Fri, May 11, 2012 at 01:03:26AM +0800, Nok wrote:
> I checked the version and found that it printed an old 1.17.17
> version which was deployed before. But I remembered i did check the
> version in guestfish shell and it said 1.17.40 before that,then i
> totally ignored the fact i had another version involved.
Local builds act a bit differently because they contain a hidden
'RPATH' ELF entry:
$ eu-readelf -d ./fish/.libs/lt-guestfish | grep RPATH
RPATH Library rpath: [/home/rjones/d/libguestfs/src/.libs:/usr/local/lib]
This RPATH entry overrides LD_LIBRARY_PATH:
$ LD_LIBRARY_PATH=/usr/lib64 ./fish/.libs/lt-guestfish --version
guestfish 1.17.40
For the builds that we provide in Fedora and RHEL, we strip out RPATH:
$ eu-readelf -d /usr/bin/guestfish | grep RPATH
$ /usr/bin/guestfish --version
/usr/bin/guestfish 1.17.36fedora=17,release=2.fc17
> I`ve changed the LD_LIBRARY_PATH and the "undefined symbol" error
> disappeared.But some "inspection API not available because of
> compiled without hivex library" pops up.I`ll check this out later.
Install the 'hivex-devel' and 'libvirt-devel' packages (from RHEL)
before ./configure && make.
You may be able to do 'yum-builddep libguestfs' to install all the
dependencies; or else read the libguestfs.spec file (BuildRequire lines).
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
+1close
closepinpinsearchminimizeforwardbackViewTextzoomoutzoominzoomin
12 years, 6 months
[PATCH v6] hivexml: Add byte run reporting functions
by Alex Nelson
This patch adds value_byte_runs and node_byte_runs. Each byte run
represents the offset and length of a data structure within the hive,
one per node, and one or two per value depending on the length of the
value data.
These byte run functions also add additional data sanity checks as a
hive is being parsed, mainly checking that a node address actually
points to a node, and similarly for values.
---
xml/hivexml.c | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 96 insertions(+), 9 deletions(-)
diff --git a/xml/hivexml.c b/xml/hivexml.c
index 54d9049..a4bc7eb 100644
--- a/xml/hivexml.c
+++ b/xml/hivexml.c
@@ -210,11 +210,40 @@ filetime_to_8601 (int64_t windows_ticks)
return ret;
}
+#define BYTE_RUN_BUF_LEN 32
+
+static int
+node_byte_runs (hive_h *h, void *writer_v, hive_node_h node)
+{
+ xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v;
+ char buf[1+BYTE_RUN_BUF_LEN];
+ errno = 0;
+ size_t node_struct_length = hivex_node_struct_length (h, node);
+ if (errno) {
+ if (errno == EINVAL) {
+ fprintf (stderr, "node_byte_runs: Invoked on what does not seem to be a node (%zu).\n", node);
+ }
+ return -1;
+ }
+ /* A node has one byte run. */
+ XML_CHECK (xmlTextWriterStartElement, (writer, BAD_CAST "byte_runs"));
+ XML_CHECK (xmlTextWriterStartElement, (writer, BAD_CAST "byte_run"));
+ memset (buf, 0, 1+BYTE_RUN_BUF_LEN);
+ snprintf (buf, 1+BYTE_RUN_BUF_LEN, "%zu", node);
+ XML_CHECK (xmlTextWriterWriteAttribute, (writer, BAD_CAST "file_offset", BAD_CAST buf));
+ snprintf (buf, 1+BYTE_RUN_BUF_LEN, "%zu", node_struct_length);
+ XML_CHECK (xmlTextWriterWriteAttribute, (writer, BAD_CAST "len", BAD_CAST buf));
+ XML_CHECK (xmlTextWriterEndElement, (writer));
+ XML_CHECK (xmlTextWriterEndElement, (writer));
+ return 0;
+}
+
static int
node_start (hive_h *h, void *writer_v, hive_node_h node, const char *name)
{
int64_t last_modified;
char *timebuf;
+ int ret = 0;
xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v;
XML_CHECK (xmlTextWriterStartElement, (writer, BAD_CAST "node"));
@@ -235,7 +264,8 @@ node_start (hive_h *h, void *writer_v, hive_node_h node, const char *name)
}
}
- return 0;
+ ret = node_byte_runs (h, writer_v, node);
+ return ret;
}
static int
@@ -267,11 +297,53 @@ end_value (xmlTextWriterPtr writer)
}
static int
+value_byte_runs (hive_h *h, void *writer_v, hive_value_h value) {
+ xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v;
+ char buf[1+BYTE_RUN_BUF_LEN];
+ size_t value_data_cell_length;
+ errno = 0;
+ size_t value_data_structure_length = hivex_value_struct_length (h, value);
+ if (errno != 0) {
+ if (errno == EINVAL) {
+ fprintf (stderr, "value_byte_runs: Invoked on what does not seem to be a value (%zu).\n", value);
+ }
+ return -1;
+ }
+ hive_value_h value_data_cell_offset = hivex_value_data_cell_offset (h, value, &value_data_cell_length);
+ if (errno != 0)
+ return -1;
+
+ XML_CHECK (xmlTextWriterStartElement, (writer, BAD_CAST "byte_runs"));
+ memset (buf, 0, 1+BYTE_RUN_BUF_LEN);
+
+ /* Write first byte run for data structure */
+ XML_CHECK (xmlTextWriterStartElement, (writer, BAD_CAST "byte_run"));
+ snprintf (buf, 1+BYTE_RUN_BUF_LEN, "%zu", value);
+ XML_CHECK (xmlTextWriterWriteAttribute, (writer, BAD_CAST "file_offset", BAD_CAST buf));
+ snprintf (buf, 1+BYTE_RUN_BUF_LEN, "%zu", value_data_structure_length);
+ XML_CHECK (xmlTextWriterWriteAttribute, (writer, BAD_CAST "len", BAD_CAST buf));
+ XML_CHECK (xmlTextWriterEndElement, (writer));
+
+ /* Write second byte run for longer values */
+ if (value_data_cell_length > 4) {
+ XML_CHECK (xmlTextWriterStartElement, (writer, BAD_CAST "byte_run"));
+ snprintf (buf, 1+BYTE_RUN_BUF_LEN, "%zu", value_data_cell_offset);
+ XML_CHECK (xmlTextWriterWriteAttribute, (writer, BAD_CAST "file_offset", BAD_CAST buf));
+ snprintf (buf, 1+BYTE_RUN_BUF_LEN, "%zu", value_data_cell_length);
+ XML_CHECK (xmlTextWriterWriteAttribute, (writer, BAD_CAST "len", BAD_CAST buf));
+ XML_CHECK (xmlTextWriterEndElement, (writer));
+ }
+ XML_CHECK (xmlTextWriterEndElement, (writer));
+ return 0;
+}
+
+static int
value_string (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value,
hive_type t, size_t len, const char *key, const char *str)
{
xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v;
const char *type;
+ int ret = 0;
switch (t) {
case hive_t_string: type = "string"; break;
@@ -297,8 +369,9 @@ value_string (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value,
XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST "value"));
XML_CHECK (xmlTextWriterWriteString, (writer, BAD_CAST str));
XML_CHECK (xmlTextWriterEndAttribute, (writer));
+ ret = value_byte_runs (h, writer_v, value);
end_value (writer);
- return 0;
+ return ret;
}
static int
@@ -307,6 +380,7 @@ value_multiple_strings (hive_h *h, void *writer_v, hive_node_h node,
const char *key, char **argv)
{
xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v;
+ int ret = 0;
start_value (writer, key, "string-list", NULL);
size_t i;
@@ -316,8 +390,9 @@ value_multiple_strings (hive_h *h, void *writer_v, hive_node_h node,
XML_CHECK (xmlTextWriterEndElement, (writer));
}
+ ret = value_byte_runs (h, writer_v, value);
end_value (writer);
- return 0;
+ return ret;
}
static int
@@ -328,6 +403,7 @@ value_string_invalid_utf16 (hive_h *h, void *writer_v, hive_node_h node,
{
xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v;
const char *type;
+ int ret = 0;
switch (t) {
case hive_t_string: type = "bad-string"; break;
@@ -353,9 +429,10 @@ value_string_invalid_utf16 (hive_h *h, void *writer_v, hive_node_h node,
XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST "value"));
XML_CHECK (xmlTextWriterWriteBase64, (writer, str, 0, len));
XML_CHECK (xmlTextWriterEndAttribute, (writer));
+ ret = value_byte_runs (h, writer_v, value);
end_value (writer);
- return 0;
+ return ret;
}
static int
@@ -363,10 +440,12 @@ value_dword (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value,
hive_type t, size_t len, const char *key, int32_t v)
{
xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v;
+ int ret = 0;
start_value (writer, key, "int32", NULL);
XML_CHECK (xmlTextWriterWriteFormatAttribute, (writer, BAD_CAST "value", "%" PRIi32, v));
+ ret = value_byte_runs (h, writer_v, value);
end_value (writer);
- return 0;
+ return ret;
}
static int
@@ -374,10 +453,12 @@ value_qword (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value,
hive_type t, size_t len, const char *key, int64_t v)
{
xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v;
+ int ret = 0;
start_value (writer, key, "int64", NULL);
XML_CHECK (xmlTextWriterWriteFormatAttribute, (writer, BAD_CAST "value", "%" PRIi64, v));
+ ret = value_byte_runs (h, writer_v, value);
end_value (writer);
- return 0;
+ return ret;
}
static int
@@ -385,12 +466,14 @@ value_binary (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value,
hive_type t, size_t len, const char *key, const char *v)
{
xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v;
+ int ret = 0;
start_value (writer, key, "binary", "base64");
XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST "value"));
XML_CHECK (xmlTextWriterWriteBase64, (writer, v, 0, len));
XML_CHECK (xmlTextWriterEndAttribute, (writer));
+ ret = value_byte_runs (h, writer_v, value);
end_value (writer);
- return 0;
+ return ret;
}
static int
@@ -398,14 +481,16 @@ value_none (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value,
hive_type t, size_t len, const char *key, const char *v)
{
xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v;
+ int ret = 0;
start_value (writer, key, "none", "base64");
if (len > 0) {
XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST "value"));
XML_CHECK (xmlTextWriterWriteBase64, (writer, v, 0, len));
XML_CHECK (xmlTextWriterEndAttribute, (writer));
+ ret = value_byte_runs (h, writer_v, value);
}
end_value (writer);
- return 0;
+ return ret;
}
static int
@@ -414,6 +499,7 @@ value_other (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value,
{
xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v;
const char *type;
+ int ret = 0;
switch (t) {
case hive_t_none:
@@ -440,8 +526,9 @@ value_other (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value,
XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST "value"));
XML_CHECK (xmlTextWriterWriteBase64, (writer, v, 0, len));
XML_CHECK (xmlTextWriterEndAttribute, (writer));
+ ret = value_byte_runs (h, writer_v, value);
}
end_value (writer);
- return 0;
+ return ret;
}
--
1.7.4.4
12 years, 6 months