[Libguestfs] [PATCH 1.32] mllib: Add String.map function for OCaml < 4.00.0.

2016-08-25 Thread Richard W.M. Jones
Same patch as just posted, but this is the modified version required for the stable-1.32 branch. Rich. ___ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs

[Libguestfs] [PATCH 1.32] mllib: Add String.map function for OCaml < 4.00.0.

2016-08-25 Thread Richard W.M. Jones
String.map was added in OCaml 4.00.0. However we use this function to implement String.lowercase_ascii etc. Therefore include a definition of the function for older versions of OCaml. (Debian Wheezy has OCaml 3.12.1.) (cherry picked from commit 5802c7750ee47b12a0497b45d8ca52e347328207) ---

[Libguestfs] [PATCH v2 4/6] New API: internal_find_inode

2016-08-25 Thread Matteo Cafasso
The internal_find_inode command searches all entries referring to the given inode and returns a tsk_dirent structure for each of them. The command is able to retrieve information regarding deleted or unaccessible files where other commands such as stat or find would fail. The gathered list of

[Libguestfs] [PATCH v2 3/6] lib: rename tsk internal function

2016-08-25 Thread Matteo Cafasso
Use a more generic name as the function will be used by other APIs. Signed-off-by: Matteo Cafasso --- src/tsk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tsk.c b/src/tsk.c index 90177ab..cc89e31 100644 --- a/src/tsk.c +++ b/src/tsk.c @@

[Libguestfs] [PATCH v2 1/6] filesystem_walk: fixed root inode listing

2016-08-25 Thread Matteo Cafasso
With the current implementation, the root inode of the given partition is ignored. The root inode is now reported. Its name will be a single dot '.' reproducing the TSK API. Signed-off-by: Matteo Cafasso --- daemon/tsk.c | 17 ++--- 1 file changed, 14

[Libguestfs] [PATCH v2 2/6] daemon: refactor tsk code

2016-08-25 Thread Matteo Cafasso
Refactor logic in preparation for new APIs. Signed-off-by: Matteo Cafasso --- daemon/tsk.c | 89 ++-- 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/daemon/tsk.c b/daemon/tsk.c index 6e6df6d..eb4f301

[Libguestfs] [PATCH v2 5/6] New API: find_inode

2016-08-25 Thread Matteo Cafasso
Library's counterpart of the daemon's internal_find_inode command. It writes the daemon's command output on a temporary file and parses it, deserialising the XDR formatted tsk_dirent structs. It returns to the caller the list of tsk_dirent structs generated by the internal_find_inode command.

[Libguestfs] [PATCH v2 6/6] find_inode: added API tests

2016-08-25 Thread Matteo Cafasso
NTFS file system always has the MFT file at inode 0. This reliable information helps testing the API. Signed-off-by: Matteo Cafasso --- tests/tsk/Makefile.am| 3 +- tests/tsk/test-find-inode.sh | 66 2 files changed, 68

Re: [Libguestfs] [PATCH v2] v2v: factor out bootloader handling

2016-08-25 Thread Richard W.M. Jones
On Thu, Aug 25, 2016 at 06:05:16PM +0200, Pino Toscano wrote: > +(* Grub2 representation. *) > +class bootloader_grub2 (g : G.guestfs) grub_config = > + let grub2_update_console ~remove = I checked the before and after code and I don't think anything has been missed out. My only comment is it

[Libguestfs] [PATCH v2] v2v: factor out bootloader handling

2016-08-25 Thread Pino Toscano
Create an object hierarchy to represent different bootloaders for Linux guests, moving the separate handling of grub1 and grub2 in different classes: this isolates the code for each type of bootloader together, instead of scattering it all around. This is mostly code refactoring, with no actual

Re: [Libguestfs] [PATCH] build: Add common CLEANFILES and DISTCLEANFILES to common-rules.mk.

2016-08-25 Thread Richard W.M. Jones
On Thu, Aug 25, 2016 at 05:29:49PM +0200, Pino Toscano wrote: > On Thursday, 25 August 2016 15:53:32 CEST Richard W.M. Jones wrote: > > By adding common CLEANFILES and DISTCLEANFILES variables to > > common-rules.mk, we can remove these from most other Makefiles, and > > also clean files more

Re: [Libguestfs] [PATCH] build: Add common CLEANFILES and DISTCLEANFILES to common-rules.mk.

2016-08-25 Thread Pino Toscano
On Thursday, 25 August 2016 15:53:32 CEST Richard W.M. Jones wrote: > By adding common CLEANFILES and DISTCLEANFILES variables to > common-rules.mk, we can remove these from most other Makefiles, and > also clean files more consistently. > > Note that bin_PROGRAMS are already cleaned by 'make

[Libguestfs] [PATCH] build: Add common CLEANFILES and DISTCLEANFILES to common-rules.mk.

2016-08-25 Thread Richard W.M. Jones
By adding common CLEANFILES and DISTCLEANFILES variables to common-rules.mk, we can remove these from most other Makefiles, and also clean files more consistently. Note that bin_PROGRAMS are already cleaned by 'make clean', so I removed cases where these were unnecessarily added to CLEANFILES.

Re: [Libguestfs] [PATCH] v2v: linux: handle UEFI path for Grub1 (RHBZ#1152369)

2016-08-25 Thread Richard W.M. Jones
On Fri, Aug 19, 2016 at 04:25:42PM +0200, Pino Toscano wrote: > Add also /boot/efi/EFI/redhat/grub.conf as configuration of Grub 1; > since the "grub" lens of Augeas does not handle this path, add a > transformation so Augeas can parse it. > --- > v2v/convert_linux.ml | 11 ++- > 1 file

Re: [Libguestfs] [PATCH] virt-rescue rewrite in OCaml

2016-08-25 Thread Pino Toscano
On Friday, 19 August 2016 14:44:44 CEST Maros Zatko wrote: > Hi, I tried to rewrite virt-rescue from C to OCaml. > Goals were feature parity with C implementation, smaller codebase and > hopefully better maintainability. I still don't know if I've covered > everything right. So, please check it

[Libguestfs] [PATCH] java: Don't try to set -source 1.5 in options.

2016-08-25 Thread Richard W.M. Jones
There was some code in configure.ac dating back to 2009 (commit b9014d6a0da8b2b3a76c4ab51fab2773fe7480b2) which attempted to add the javac option `-source 1.5'. I don't think this code ever worked. However, if -source 1.5 is added, then you get this warning: warning: [options] bootstrap class

Re: [Libguestfs] [PATCH 0/3] New API: find_inode

2016-08-25 Thread NoxDaFox
2016-08-25 16:12 GMT+03:00 Pino Toscano : > On Thursday, 25 August 2016 16:05:47 CEST NoxDaFox wrote: > > 2016-08-25 14:09 GMT+03:00 Pino Toscano : > > > > > On Wednesday, 24 August 2016 23:59:53 CEST Matteo Cafasso wrote: > > > > The find_inode API

Re: [Libguestfs] [PATCH 1/3] New API: internal_find_inode

2016-08-25 Thread NoxDaFox
2016-08-25 14:19 GMT+03:00 Pino Toscano : > On Wednesday, 24 August 2016 23:59:54 CEST Matteo Cafasso wrote: > > The internal_find_inode command searches all entries referring to the > > given inode and returns a tsk_dirent structure for each of them. > > > > The command is

Re: [Libguestfs] [PATCH 0/3] New API: find_inode

2016-08-25 Thread Pino Toscano
On Thursday, 25 August 2016 16:05:47 CEST NoxDaFox wrote: > 2016-08-25 14:09 GMT+03:00 Pino Toscano : > > > On Wednesday, 24 August 2016 23:59:53 CEST Matteo Cafasso wrote: > > > The find_inode API allows the User to search all the entries referring > > > to a given inode and

Re: [Libguestfs] [PATCH 0/3] New API: find_inode

2016-08-25 Thread NoxDaFox
2016-08-25 14:09 GMT+03:00 Pino Toscano : > On Wednesday, 24 August 2016 23:59:53 CEST Matteo Cafasso wrote: > > The find_inode API allows the User to search all the entries referring > > to a given inode and returns a tsk_dirent structure for each of them. > > > > As I

Re: [Libguestfs] [PATCH 0/5] bash completion: Add missing bash completion scripts (RHBZ#1367738).

2016-08-25 Thread Pino Toscano
On Thursday, 25 August 2016 13:15:24 CEST Richard W.M. Jones wrote: > This implements most of RHBZ#1367738. I didn't bother > with virt-v2v-copy-to-local and virt-win-reg, but all the > other tools now have full bash completion. Mostly LGTM -- only a commit-related note left. Thanks, -- Pino

Re: [Libguestfs] [PATCH 5/5] bash completion: Add missing bash completion scripts (RHBZ#1367738).

2016-08-25 Thread Pino Toscano
On Thursday, 25 August 2016 13:15:29 CEST Richard W.M. Jones wrote: > Add new scripts for: > > - guestunmount > - virt-copy-in > - virt-copy-out > - virt-customize > - virt-dib > - virt-diff > - virt-get-kernel > - virt-p2v-make-disk > - virt-p2v-make-kickstart > - virt-p2v-make-kiwi > -

[Libguestfs] [PATCH 5/5] bash completion: Add missing bash completion scripts (RHBZ#1367738).

2016-08-25 Thread Richard W.M. Jones
Add new scripts for: - guestunmount - virt-copy-in - virt-copy-out - virt-customize - virt-dib - virt-diff - virt-get-kernel - virt-p2v-make-disk - virt-p2v-make-kickstart - virt-p2v-make-kiwi - virt-tar-in - virt-tar-out Also combine the separate virt-resize script into the general script

[Libguestfs] [PATCH 2/5] fuse: Implement --long-options and --short-options in guestunmount.

2016-08-25 Thread Richard W.M. Jones
--- fuse/Makefile.am| 2 ++ fuse/guestunmount.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/fuse/Makefile.am b/fuse/Makefile.am index c70f649..2848685 100644 --- a/fuse/Makefile.am +++ b/fuse/Makefile.am @@ -82,11 +82,13 @@ guestmount_LDADD = \ # guestunmount

[Libguestfs] [PATCH 4/5] bash completions: Add tip for how to run bash completions locally to README.

2016-08-25 Thread Richard W.M. Jones
--- bash/README | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bash/README b/bash/README index db7d7bb..314bfd0 100644 --- a/bash/README +++ b/bash/README @@ -1,3 +1,6 @@ This directory contains the scripts for tab-completing commands in bash. Note these new-style demand-loaded scripts

[Libguestfs] [PATCH 1/5] fish: Move display_*_options functions to a separate file.

2016-08-25 Thread Richard W.M. Jones
By moving these two functions out of the common options parsing code, it means we don't need to depend on all the other machinery of options parsing, such as the global variables ("verbose"), libconfig, etc. --- align/Makefile.am | 2 ++ align/scan.c | 1 + cat/Makefile.am

[Libguestfs] [PATCH 3/5] p2v: Implement --short-options and --long-options in virt-p2v-make-* scripts.

2016-08-25 Thread Richard W.M. Jones
--- p2v/virt-p2v-make-disk.in | 15 +-- p2v/virt-p2v-make-kickstart.in | 24 +++- p2v/virt-p2v-make-kiwi.in | 24 +++- 3 files changed, 51 insertions(+), 12 deletions(-) diff --git a/p2v/virt-p2v-make-disk.in

[Libguestfs] [PATCH 0/5] bash completion: Add missing bash completion scripts (RHBZ#1367738).

2016-08-25 Thread Richard W.M. Jones
This implements most of RHBZ#1367738. I didn't bother with virt-v2v-copy-to-local and virt-win-reg, but all the other tools now have full bash completion. Rich. ___ Libguestfs mailing list Libguestfs@redhat.com

Re: [Libguestfs] [PATCH] inspection: Fix parsing of btrfs subvolumes in /etc/fstab.

2016-08-25 Thread Pino Toscano
On Thursday, 25 August 2016 11:12:32 CEST Richard W.M. Jones wrote: > The code to parse btrfs subvol entries in /etc/fstab failed if the > entry had more than one comma-separated option, for example: > > /dev/sda4 /home btrfs rw,user,subvol=foo 0 0 > > This commit fixes that code to use Augeas

Re: [Libguestfs] [PATCH 0/3] New API: find_inode

2016-08-25 Thread Pino Toscano
On Wednesday, 24 August 2016 23:59:53 CEST Matteo Cafasso wrote: > The find_inode API allows the User to search all the entries referring > to a given inode and returns a tsk_dirent structure for each of them. > > As I didn't want to change unrelated code, there is a little bit > of code

Re: [Libguestfs] [PATCH] filesystem_walk: fixed root inode listing

2016-08-25 Thread Pino Toscano
On Wednesday, 24 August 2016 23:42:05 CEST Matteo Cafasso wrote: > With the current implementation, the root inode of the given partition > is ignored. > > The root inode is now reported. Its name will be a single dot '.' > reproducing the TSK API. > > Signed-off-by: Matteo Cafasso

[Libguestfs] [PATCH] inspection: Fix parsing of btrfs subvolumes in /etc/fstab.

2016-08-25 Thread Richard W.M. Jones
The code to parse btrfs subvol entries in /etc/fstab failed if the entry had more than one comma-separated option, for example: /dev/sda4 /home btrfs rw,user,subvol=foo 0 0 This commit fixes that code to use Augeas correctly. Fixes commit 7ba0e10501f23358c38939930d613bf2393d744d. Reported by: