| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This is a shorter and more convenient way to disable errors
temporarily across calls.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New APIs: set-tmpdir, get-tmpdir, set-cachedir, get-cachedir.
The current code has evolved over time and has a number of problems:
(a) A single environment variable ($TMPDIR) controls the
location of several directories.
(b) It's hard for the library user to predict which directory
libguestfs will use, unless the user simulates the same internal steps
that libguestfs performs.
This commit fixes these issues.
(a) Now three environment variables control the location of all small
temporary files, and the appliance cache:
For temporary files: $LIBGUESTFS_TMPDIR or $TMPDIR or /tmp.
For the appliance cache: $LIBGUESTFS_CACHEDIR or $TMPDIR or /var/tmp.
The user can also set these directories explicitly through API calls
(guestfs_set_tmpdir and guestfs_set_cachedir).
(b) The user can also retrieve the actual directories that libguestfs
will use, by calling guestfs_get_tmpdir and guestfs_get_cachedir.
These functions are also used internally.
This commit also:
- reworks the internal tmpdir code
- removes the internal (undocumented) guestfs_tmpdir call (replacing
it with calls to the documented guestfs_get_tmpdir API instead)
- changes the ./run script to set LIBGUESTFS_TMPDIR and
LIBGUESTFS_CACHEDIR
- adds a test
- fixes a few places like libguestfs-make-fixed-appliance which
depended on $TMPDIR
|
|
|
|
|
|
|
| |
The 'windows_path' function was blindly copied from virt-cat. In
virt-cat, errors are checked by the caller to 'windows_path'. But
virt-edit lacks this check. Change the function in virt-edit to add a
check and exit on error.
|
|
|
|
|
|
| |
"h" option is not enabled in virt-cat, remove it.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
|
|
|
|
| |
For some reason these tests did not have license notices.
|
|
|
|
|
|
|
|
|
|
| |
This adds standard LICENSE and BUGS sections to all of the man pages
that are processed by podwrapper.
Modify all the calls to $(PODWRAPPER) to add the right --license
parameter according to the content. Note that this relaxes the
license on some code example pages, making them effectively BSD-style
licensed.
|
|
|
|
|
|
|
|
|
|
| |
section.
Ensure each man page contains consistent COPYRIGHT and AUTHOR
sections.
Remove the LICENSE section. We will add that back in podwrapper in a
later commit.
|
|
|
|
|
|
| |
Since our minimum supported version is now 1.16 and mount was fixed in
1.13.16, it is now safe to replace mount-options + empty options with
mount wherever it occurs.
|
|
|
|
|
| |
This file handles the -d option for guestfish and other C command line
utilities. Renaming this file makes it less confusing.
|
|
|
|
|
| |
Instead of working around bugs, podwrapper has been fixed so that
links work in all output formats.
|
|
|
|
|
| |
This will allow us to easily change the location of this
script in future.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new API splits orderly close into a two-step process:
if (guestfs_shutdown (g) == -1) {
/* handle the error, eg. qemu error */
}
guestfs_close (g);
Note that the explicit shutdown step is only necessary in the case
where you have made changes to the disk image and want to handle write
errors. Read the documentation for further information.
This change also:
- deprecates guestfs_kill_subprocess
- turns guestfs_kill_subprocess into the same as guestfs_shutdown
- changes guestfish and other tools to call shutdown + close
where necessary (not for read-only tools)
- updates documentation
- updates examples
|
|
|
|
|
|
|
|
|
|
| |
Replace:
cp tests/guests/fedora.img test.img
with the longer but possibly more space-efficient equivalent:
qemu-img create -F raw -b tests/guests/fedora.img -f qcow2 test.qcow2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MALLOC_PERTURB_ is a glibc feature which causes malloc to wipe memory
before and after it is used, allowing both use-after-free and
uninitialized reads to be detected with relatively little performance
penalty:
http://udrepper.livejournal.com/11429.html?nojs=1
Modify the ./run script so that it always sets this.
We were already using MALLOC_PERTURB_ in most tests. Since ./run is
now setting this, we can remove it from individual Makefiles. Most
TESTS_ENVIRONMENT will now simply look like this:
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
|
|
|
|
|
|
| |
This option, when added via
TESTS_ENVIRONMENT = [...] $(top_builddir)/run --test
allows us to run the tests and only print the full output (including
debugging etc) when the test fails.
|
| |
|
|
|
|
| |
(RHBZ#788641)
|
| |
|
|
|
|
| |
(Includes fix by RWMJ)
|
|
|
|
| |
Update all copyright dates to 2012.
|
|
|
|
|
|
| |
Ensure that the drv structure is always zeroed on allocation.
Don't leak old drv->device when add_drives is called multiple times.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This avoids conflicts with the globally installed libguestfs
appliance, or lets us build in multiple local directories at the same
time without conflicts.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Turn:
=item B<-a> | B<--all>
into:
=item B<-a>
=item B<--all>
This gives a more natural-looking manual page, as well as making it
easier to directly link to these sections.
|
| |
|
| |
|
|
|
|
| |
This updates commit 2b5fbc882a0a79646b668c7b95442f0b3673d63a.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This moves the tool programs into a single directory:
cat/* -> tools/virt-cat
df/* -> tools/virt-df
edit/* -> tools/virt-edit
rescue/* -> tools/virt-rescue
This in itself simplifies the build process because we only need
one Makefile and one copy of 'run-locally'.
'run-*-locally' has become just 'run-locally' and takes an extra
parameter which is the name of the tool, eg:
run-locally cat [virt-cat params...]
virt-inspector stays in its own directory, because this contains
more than just a single Perl script.
|
|
|
|
| |
This fixes commit b488436cc54288fcae8988493749f2e6c87f274c.
|
|
|
|
|
|
| |
Partially revert b488436cc54288fcae8988493749f2e6c87f274c.
It turns out that automake doesn't automatically place bin_SCRIPTS
in EXTRA_DIST.
|
| |
|
| |
|
|
|
|
| |
Don't fail with a partial file if disk full, etc.
|
| |
|
|
Edit any file in a guest. This was possibly previously
using guestfish, but having a separate command makes it
simpler.
The usage is simply:
virt-edit mydomain /some/file
It runs $EDITOR or vi on the file, and if the user changes
it, uploads the result back to the VM.
|