| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
The other programs have the variable, but the flag is not enabled
either because it doesn't make sense or because the implications are
not well understood.
|
| |
|
|
|
|
| |
This avoids breakage on Ubuntu.
|
|
|
|
| |
See discussion in RHBZ#660687.
|
|
|
|
|
| |
We were being over-complex in this call. All the FUSE API requires
this call to do is to check permissions.
|
|
|
|
|
| |
If hash_delete returns NULL and --verbose option was given then
this would cause a segfault.
|
|
|
|
|
|
| |
We are now going to build binaries for each distribution so
there is no need to build the quasi-distro-independent static
binaries any more.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This tool replaces virt-list-filesystems and virt-list-partitions with
a new tool written in C with a more uniform command line structure
and output.
This existing Perl tools are deprecated but remain indefinitely.
|
|
|
|
| |
Also add virt-cat.static target.
|
|
|
|
|
|
| |
This also makes libxml2 and libvirt into optional dependencies.
If they are missing then the core API will print an error, as
will the '-d' option to guestfish.
|
|
|
|
|
|
|
|
|
|
| |
This adds the guestfish --rw option, intended in future
to be required for writing to disk images.
At the moment this does not change the default and so does
nothing. This patch is intended for backporting to the
stable branches so that we can start to introduce scripts
which use 'guestfish --rw'.
|
|
|
|
|
|
|
|
|
|
|
| |
This feature is also available in guestmount because of the
shared option parsing code.
You don't need to do anything to enable it, just using -i
will attempt decryption of encrypted partitions.
Only works for simple Fedora whole-disk encryption. It's a
work-in-progress to make it work for other types of encryption.
|
| |
|
|
|
|
|
| |
This is indirectly required via the new shared guestfish
C inspection code by libxml2.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In guestfish, factor out the processing of the options -a, -c,
-d, -i, -m, -n, -r, -v, -V, -x into a separate set of files:
options.c, options.h, inspect.c, virt.c.
Change guestmount so that it uses these same files (from the
../fish directory) to process the same options.
This unifies the handling of these options between the two programs.
It also adds the useful inspection feature to guestmount, so you
can now do:
guestmount -d Guest -i --ro mnt/
|
| |
|
|
|
|
|
|
| |
This updates commit 44c5ee1163918bd5c9e6aa6c292f0c3bb15b7b25.
Document the --format option in the guestmount manual page.
|
|
|
|
|
| |
For command line disk images, specify the format using --format option
in the same way as for guestfish.
|
|
|
|
|
|
|
|
|
|
|
|
| |
If this string was non-empty, then it broke a lot of things because
autoconf and other parts of the build system were expecting this
string to contain a simple MAJOR.MINOR.RELEASE version number.
This requires changes to guestfish and guestmount so they use the
guestfs_version API to fetch the version from the library. (The
Perl tools were already doing it this way). In a way this is more
accurate, because it's no longer hard-coded in the binary, but
fetched from the dynamically linked libguestfs.so.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The guestfs_write call can be used to create small files with
arbitrary 8 bit content, including \0 bytes.
This replaces and deprecates write-file, which cannot be modified
to use BufferIn because of an unfortunate choice in the ABI: the
size parameter to write-file, if zero, means that the daemon tries
to calculate the length of the buffer using strlen. However this
fails if we pass a zero-length buffer using BufferIn because then
the daemon tries to do strlen on a (really) zero length buffer, not
even containing a terminating \0 character, thus segfaulting.
|
|
|
|
|
|
|
|
| |
guestmount.c: In function 'main':
guestmount.c:899: error: implicit declaration of function 'setlocale'
[-Wimplicit-function-declaration]
guestmount.c wasn't including locale.h.
|
| |
|
|
|
|
|
|
| |
Since we have to compile with -Wno-unused-variables, we don't
spot unused variables in code. I found these by compiling the
code in Ubuntu.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
guestfs_mount adds -o sync implicitly. This causes a very large
performance problem for write-intensive programs (eg. virt-v2v).
Document this as a "gotcha".
Change the tests, guestfish, Sys::Guestfs::Lib, guestmount to use
mount-options instead.
(Note that this gotcha does not affect mount-ro).
The source of the performance problem was first identified by
Matthew Booth.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds the calls to setlocale &c to all of the current
C programs.
It also adds l10n support to hivexget and hivexml which lacked them
previously.
To test this, try:
LANG=pa_IN.UTF-8 guestfish --cmd-help
(You can only do this test after installing the package, or at
least the 'pa.mo' mo-file in the correct place).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use this program as a convenient way to list the filesystems
available in a disk image or libvirt guest.
Example:
$ virt-list-filesystems /dev/vg_trick/Debian5x64
/dev/debian5x64/home
/dev/debian5x64/root
/dev/debian5x64/tmp
/dev/debian5x64/usr
/dev/debian5x64/var
/dev/sda1
This is designed to make it easier for novices to use guestfish
and guestmount. In particular with guestmount this acts as a way
to get a list of filesystems to use with the '-m' option. ie:
$ virt-list-filesystems unknowndisk.img
/dev/sda1
/dev/sda2
$ guestmount -a unknowndisk.img -m /dev/sda1 /mnt
|
|
|
|
|
|
|
|
|
|
| |
Convert by running these commands:
perl -pi -e 's/\b(usage ?)\(1\)/$1(EXIT_FAILURE)/' \
fish/fish.c fuse/guestmount.c
perl -pi -e 's/\b(usage ?)\(0\)/$1(EXIT_SUCCESS)/' \
fish/fish.c fuse/guestmount.c
* fish/fish.c (main): Replace 0/1 with EXIT_SUCCESS/EXIT_FAILURE.
* fuse/guestmount.c (main): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert all uses automatically, via these two commands:
git grep -l '\<exit *(1)' \
| grep -vEf .x-sc_prohibit_magic_number_exit \
| xargs --no-run-if-empty \
perl -pi -e 's/\b(exit ?)\(1\)/$1(EXIT_FAILURE)/'
git grep -l '\<exit *(0)' \
| grep -vEf .x-sc_prohibit_magic_number_exit \
| xargs --no-run-if-empty \
perl -pi -e 's/\b(exit ?)\(0\)/$1(EXIT_SUCCESS)/'
* .x-sc_prohibit_magic_number_exit: New file.
Edit (RWMJ): Don't change Java code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds an explicit dependency on generator.ml for every file it
generates, except java files. Java is left for another time because it's
considerably trickier.
It also adds a build rule for src/libguestfs.la so it can be rebuilt as required
from other directories.
It does this by creating a top level make file, subdir-rules.mk, which can be
included from sub-directories. sub-directories need to define 'generator_built'
to include local files which are built by generator.ml, and they will be updated
automatically.
This fixes parallel make, and will automatically re-create generated files when
make is run from any directory.
It also fixes the problem which efad4f53 was targetting. Specifically,
src/guestfs_protocol.(c|h) had an erroneous dependency on stamp-generator, and
therefore generator.ml, despite not being directly created by it. This caused
them to be recreated every time generator.ml ran rather than only when
src/guestfs_protocol.x was updated, which cascaded into a daemon and therefore
appliance update.
This patch also changes the contents of the distribution tarball by including
files created by rpcgen.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Jim Meyering wrote:
>>From 6f128e90afb055f9899011c4a592eb289e678936 Mon Sep 17 00:00:00 2001
> From: Jim Meyering <meyering@redhat.com>
> Date: Thu, 19 Nov 2009 11:39:10 +0100
> Subject: [PATCH libguestfs] syntax-check: expand TABs in generator.ml
>
> * src/generator.ml: Expand leading TABs to spaces.
That was incomplete.
Please use the following instead.
With it, now, "make syntax-check" now passes once again.
>From 716a30d0b692972aac8fbea1fb7ad3318ab3a0d8 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Thu, 19 Nov 2009 11:39:10 +0100
Subject: [PATCH libguestfs] syntax-check: expand leading TABs
* src/generator.ml: Expand leading TABs to spaces.
* fuse/test-fuse.sh: Likewise.
|
|
|
|
|
| |
These macros don't exist on RHEL/CentOS 5.4. If the feature
is missing then just don't implement it in the FUSE layer.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(NB: The API / ABI doesn't actually change here - it's just made much
simpler to use).
The API for RBufferOut functions was unexpectedly hard to use in the
case where a zero-length buffer might be returned. For discussion on
this see:
https://www.redhat.com/archives/libguestfs/2009-November/thread.html#00115
This commit ensures that in the zero-length buffer case, the return
value is never NULL. Thus code is now able to just check if the return
value == NULL to indicate an error, which is simpler for all concerned.
The implementation of this is, however, more complex because we have
to be careful about this case inside both the daemon and the library
code, which is what this commit does.
This has passed a full round of tests.
|
|
|
|
|
| |
This script contains non-exhaustive tests for the system calls
implemented by guestmount.
|
|
|
|
|
| |
Error handling for the guestfs_pread call was incorrect, which
meant that empty files could produce spurious error messages.
|
|
|
|
|
| |
We need to invalidate both parameters, otherwise the old (moved)
file can appear that it still exists after the move.
|
|
|
|
|
| |
The parameters were swapped. We also need to invalidate the
cache for both parameters.
|
|
|
|
| |
The parameters were swapped, preventing symlinks from being created.
|
|
|
|
|
| |
Move these to private header file(s) and other places as required
since these aren't part of the public API.
|
|
|
|
|
| |
* fuse/guestmount.c (fg_readlink): Perform cast in a
separate statement to hide it from "make syntax-check".
|
|
|
|
|
| |
git grep -l 'strcmp *([^=]*== *0'|xargs \
perl -pi -e 's/\bstrcmp( *\(.*?\)) *== *0/STREQ$1/g'
|
|
|
|
|
|
|
|
|
|
|
| |
* HACKING: Expand indentation TABs.
* configure.ac: Likewise.
* daemon/daemon.h: Likewise.
* daemon/guestfsd.c: Likewise.
* fuse/guestmount.c: Likewise.
* hivex/LICENSE: Likewise.
* src/generator.ml: Likewise.
* tools/virt-win-reg: Likewise.
|
|
|
|
| |
* fuse/guestmount.pod: Avoid "the the".
|
| |
|
| |
|
| |
|