summaryrefslogtreecommitdiffstats
path: root/cat
Commit message (Collapse)AuthorAgeFilesLines
* tests: Replace 'make extra-tests' with individual tests.Richard W.M. Jones2012-11-134-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | 'make extra-tests' was a monolithic set of tests that did all sorts of things: valgrind, tests over local guests, tests with upstream qemu, tests with upstream libvirt, tests with the appliance attach method. This made it hard to perform individual tests, eg. just valgrind testing. It was also hard to maintain because the tests were not located in the same directories as the programs and sometimes duplicated tests that were run elsewhere. This commit splits up 'make extra-tests' into 5 separate targets: make check-valgrind # run a subset of tests under valgrind make check-valgrind-local-guests # test under valgrind with local guests make check-with-appliance # test with attach-method == appliance make check-with-upstream-qemu # test with an alternate/upstream qemu make check-with-upstream-libvirt # test with an alternate/upstream libvirt (You can also still run 'make extra-tests' which is now simply a rule that runs the above 5 targets in order). This replaces everything that was in the tests/extra directory, so that has now gone.
* tools: Modify existing tools to use guestfs_{push,pop}_error_handler.Richard W.M. Jones2012-11-091-26/+14
| | | | | This is a shorter and more convenient way to disable errors temporarily across calls.
* remove the useless "h" optionWanlong Gao2012-09-261-3/+0
| | | | | | "h" option is not enabled in virt-cat, remove it. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* syntax: Remove definitions of O_CLOEXEC, except in examples (thanks Jim ↵Richard W.M. Jones2012-09-171-4/+0
| | | | | | | Meyering). The gnulib <fcntl.h> replacement header will now define this symbol if it's not defined already.
* syntax: Remove PATH_MAX-sized buffers allocated on the stack.Richard W.M. Jones2012-09-151-3/+6
| | | | | | | | | | | | | | On Linux PATH_MAX is 4096, but on some platforms it can be much larger or even not defined (ie. unlimited). Therefore using a PATH_MAX-sized stack buffer is not a great idea for portable programs. This change removes use of PATH_MAX-sized stack-allocated buffers. This change only applies to the library and standalone programs. Inside the daemon, memory allocation is much more complicated so I have not changed those (yet). Found by 'make syntax-check'.
* tests: Attach copyright and license (GPLv2+) notices to various test scripts.Richard W.M. Jones2012-08-313-0/+48
| | | | For some reason these tests did not have license notices.
* podwrapper: Add --license parameter, which is required.Richard W.M. Jones2012-08-211-0/+3
| | | | | | | | | | 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.
* man pages: Ensure consistent copyright/author sections, remove licenseRichard W.M. Jones2012-08-213-43/+1
| | | | | | | | | | 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.
* guestfs_lstatlist, guestfs_lxattrlist: Reimplement to avoid protocol limits.Richard W.M. Jones2012-08-171-167/+8
| | | | | Note that the code to do this was already in virt-ls, so this is change is mostly just moving the code into the core library.
* guestfs_find: Reimplement to avoid protocol limits.Richard W.M. Jones2012-08-171-52/+9
| | | | | This also reimplements the virt-ls -R option to use the replacement guestfs_find API, which is simpler (though actually less efficient).
* fish: Rename fish/virt.c to fish/domain.cRichard W.M. Jones2012-07-191-2/+2
| | | | | This file handles the -d option for guestfish and other C command line utilities. Renaming this file makes it less confusing.
* build: Change calls to podwrapper.sh to use $(PODWRAPPER).Richard W.M. Jones2012-07-161-3/+3
| | | | | This will allow us to easily change the location of this script in future.
* run: Set MALLOC_PERTURB_ to a random value.Richard W.M. Jones2012-06-281-5/+1
| | | | | | | | | | | | | | | | | 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
* tests: Add ./run --test option.Richard W.M. Jones2012-06-261-1/+1
| | | | | | | 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.
* New API: guestfs_canonical_device_name.Richard W.M. Jones2012-06-131-31/+25
| | | | This API makes device names canonical, eg. /dev/vda1 -> /dev/sda1.
* virt-ls: Don't initialize path = NULL.Richard W.M. Jones2012-05-171-1/+1
|
* virt-ls: Fix --checksum option (RHBZ#822490).Richard W.M. Jones2012-05-171-1/+2
|
* filesystems: Implement parents of MD and VG devices (RHBZ#805070).Richard W.M. Jones2012-03-211-16/+223
|
* filesystems: Allow the parents column to contain multiple parents.Richard W.M. Jones2012-03-202-16/+65
| | | | | | A list of parents is passed for this column. This column is rendered as an (internally) comma-separated list.
* Use O_CLOEXEC / SOCK_CLOEXEC for almost all file descriptors.Richard W.M. Jones2012-03-141-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | The presumption is that all file descriptors should be created with the close-on-exec flag set. The only exception are file descriptors that we want passed through to exec'd subprocesses (mainly pipes and stdin/stdout/stderr). For open calls, we pass O_CLOEXEC as an extra flag, eg: fd = open ("foo", O_RDONLY|O_CLOEXEC); This is a Linux-ism, but using a macro we can easily make it portable. For sockets, similarly: sock = socket (..., SOCK_STREAM|SOCK_CLOEXEC, ...); For accepted sockets, we use the Linux accept4 system call which allows flags to be supplied, but we use the Gnulib 'accept4' module to make this portable. For dup, dup2, we use the Linux dup3 system call, and the Gnulib modules 'dup3' and 'cloexec'.
* Do not run appliance-related checks if not building applianceHilko Bengen2012-01-231-0/+2
|
* Replace setting of environment variables with usage of local run scriptHilko Bengen2012-01-231-3/+1
| | | | (Includes fix by RWMJ)
* Tempus fugit.Richard W.M. Jones2012-01-186-7/+7
| | | | Update all copyright dates to 2012.
* fish options parsing: Allow add_drives to be called multiple times.Richard W.M. Jones2012-01-182-6/+4
| | | | | | Ensure that the drv structure is always zeroed on allocation. Don't leak old drv->device when add_drives is called multiple times.
* tests: Split images -> tests/data + tests/guestsRichard W.M. Jones2011-12-223-6/+6
|
* filesystems: Fix memory leak found by valgrind.Richard W.M. Jones2011-11-241-1/+3
|
* Update FSF address.Matthew Booth2011-11-087-7/+7
|
* virt-filesystems: Add MBR partition type byte to the output.Richard W.M. Jones2011-10-252-12/+64
| | | | | | | | | | | | | This adds an extra column containing this information, looking like this: Name Type VFS Label MBR Size Parent /dev/sda1 filesystem ntfs - - 6.0G - /dev/sda1 partition - - 07 6.0G /dev/sda /dev/sda device - - - 6.0G - In particular you can use this to tell if a partition is an extended partition, because the field will contain '05' or '0f'.
* virt-cat: Handle Windows paths and drive letters (RHBZ#693359).Richard W.M. Jones2011-10-252-3/+180
|
* cat: Small documentation correction.Richard W.M. Jones2011-08-281-2/+1
|
* man pages: Add a standard EXIT STATUS section to most pages.Richard W.M. Jones2011-08-273-0/+15
|
* out-of-tree build: fix documentation generationHilko Bengen2011-08-151-3/+3
|
* build: Set TMPDIR for local testing.Richard W.M. Jones2011-08-081-1/+2
| | | | | | This avoids conflicts with the globally installed libguestfs appliance, or lets us build in multiple local directories at the same time without conflicts.
* docs: Separate out combined =item 's in man pages.Richard W.M. Jones2011-07-161-2/+6
| | | | | | | | | | | | | | | 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.
* virt-ls: Add virt-ls -lR option for complex file iteration.Richard W.M. Jones2011-06-043-36/+1133
|
* virt-ls: Refactor mode selection code.Richard W.M. Jones2011-06-041-77/+123
| | | | This is just code motion.
* virt-ls: Small fix for output of --help option.Richard W.M. Jones2011-06-041-1/+1
|
* Enable deprecation warnings on all C programs.Richard W.M. Jones2011-05-171-0/+3
|
* fish: Allow -d UUID (specify libvirt domains by UUID).Richard W.M. Jones2011-05-063-3/+6
| | | | | | | | | | | | | | This applies in all the commands which use the common C option parsing code, ie: * guestfish * guestmount * virt-cat * virt-df * virt-filesystems * virt-inspector * virt-ls * virt-rescue
* doc: Use I<-...> for cross-references to command line options.Richard W.M. Jones2011-05-011-2/+2
| | | | This is now used consistently across all the documentation.
* Remove ad-hoc run*locally scripts, replace with './run'Richard W.M. Jones2011-04-164-160/+0
| | | | | Remove all the run*locally scripts and replace with a single top level ./run shell script.
* Add more missing include directives.Jim Meyering2011-04-133-3/+9
| | | | | | * cat/virt-cat.c: Include string.h and libintl.h. * cat/virt-filesystems.c: Likewise. * cat/virt-ls.c: Likewise.
* cat, edit: Reference guestfish equivalent commands in the manual pages.Richard W.M. Jones2011-04-051-2/+26
|
* Add /etc/libguestfs-tools.conf configuration file.Richard W.M. Jones2011-03-311-4/+11
| | | | | This allows the default for --ro or --rw to be controlled for the three tools guestfish, guestmount and virt-rescue.
* Include <locale.h> in compilation units that use setlocale function.Richard W.M. Jones2011-03-073-0/+3
| | | | Fix required by gcc 4.6.0.
* fish: Add guestfish --live, guestmount --live options.Richard W.M. Jones2011-02-033-0/+6
| | | | | | 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.
* virt-filesystems: Ignore errors when getting label and UUID (RHBZ#668112).Richard W.M. Jones2011-01-081-6/+29
| | | | | | | | | | | If virt-filesystems was pointed to an image that contained bogus or blank filesystems, then calls to vfs-label and/or vfs-uuid could fail, resulting in errors like this: libguestfs: error: vfs_label: /dev/vda1: These errors can be ignored and shouldn't stop virt-filesystems from working.
* New tools: virt-copy-in, virt-copy-out, virt-tar-in, virt-tar-out.Richard W.M. Jones2011-01-031-0/+2
| | | | | Relatively trivial wrappers around the equivalent guestfish commands. Change also includes new man pages.
* filesystems: Document the columns in --long output.Richard W.M. Jones2011-01-021-0/+54
|
* Remove several unused local variables.Richard W.M. Jones2010-12-101-1/+0
| | | | (Revealed by compiling under Debian where this is a warning).