summaryrefslogtreecommitdiffstats
path: root/fish
Commit message (Collapse)AuthorAgeFilesLines
...
* fish: Move 'feature_available' function to global.Richard W.M. Jones2012-05-023-20/+20
| | | | This is just code motion.
* fish: Clean up glob code and make it return error if malloc fails.Richard W.M. Jones2012-05-021-39/+54
| | | | | | This commit tidies up the code for the 'glob' command. It also makes the command return an error if malloc fails (previously it would just print a message but not return any error indication).
* fish: Add --pipe-error flag to allow detection of errors in pipe commands ↵Richard W.M. Jones2012-05-022-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (RHBZ#803533). For a test case, see: https://bugzilla.redhat.com/show_bug.cgi?id=803533 In guestfish, we use the gnulib closeout module which sets up an atexit handler to detect if there were any errors on stdout when the program exits. This is so we can fail correctly in out of disk space cases like: guestfish [...] > output However the atexit handler just checks that there was any error on stdout (using ferror). If a pipe command such as: ><fs> command_with_lots_of_output | head ran at any time during the session, the error flag would be set (because the underlying writes failed with EPIPE errors). So the commit first adds a test for ferror (stdout) after each command that we issue. This brings error handling closer to the point of failure, and so is generally a good thing. Secondly we reset the error flag after detecting and dealing with the error, so that avoids the redundant 'guestfish: write error' message produced by gnulib closeout. Thirdly we add a --pipe-error flag which causes guestfish commands to fail on pipe commands line the one above. The default is off for backwards compatibility reasons.
* Remove "convenience header" "gettext.h" and use <libintl.h> instead.Richard W.M. Jones2012-05-0129-23/+28
| | | | | | | | | | | | gettextize provides a local file called "gettext.h". Remove this and use <libintl.h> from glibc headers instead. Most of this change is mechanical: #include <libintl.h> in every C file which uses any gettext function. But also we remove the gettext.h file, and adjust the "_" macros. Note that this effectively removes the ./configure --disable-nls option, although we don't know if that ever worked.
* fish: Add opaque field to the drives list for programs to use.Richard W.M. Jones2012-04-261-0/+5
| | | | Not used at present.
* maint: fix doc typosJim Meyering2012-04-181-3/+3
| | | | | | | Fix typos spotted by http://github.com/lyda/misspell-check. * configure.ac: As above. * ocaml/examples/guestfs-ocaml.pod: Likewise. * fish/guestfish.pod: Likewise.
* fish: Add a regression test for mount-local, mount-local-run commands.Richard W.M. Jones2012-03-312-0/+81
|
* fish: Fix compilation when libconfig is not available.Richard Jones2012-03-281-2/+2
|
* Use the new lvcreate-free API to create largest possible LVs.Richard W.M. Jones2012-03-152-24/+6
|
* Use O_CLOEXEC / SOCK_CLOEXEC for almost all file descriptors.Richard W.M. Jones2012-03-144-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | 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'.
* Replace 'int' with 'size_t' passim.Richard W.M. Jones2012-03-137-24/+26
| | | | | Analyze all uses of 'int' in the code, and replace with 'size_t' where appropriate.
* fish: remote: Output from close event now passed over stdout (RHBZ#802389).Richard W.M. Jones2012-03-123-3/+55
|
* fish: remote: Make sure global cleanups are called for guestfish --listen.Richard W.M. Jones2012-03-123-2/+5
| | | | | Return to the main program ('fish.c') and perform global cleanups when the guestfish remote server exits.
* fish: remote: Move close_stdout just before accept() call.Richard W.M. Jones2012-03-121-6/+6
| | | | This is just code motion.
* fish: Rename tests and make test paths relative.Richard W.M. Jones2012-03-1215-49/+49
| | | | | | | | | | When these tests were originally in the old regressions/ directory, they used to refer to guestfish via the path '../fish/guestfish'. Some of the tests were also called 'test-guestfish-*'. Now that the tests have been moved into the fish/ directory, neither of these things make sense. So change the relative path to './guestfish' and rename all 'test-guestfish-*' as 'test-*'.
* dist: Distribute all tests, even when configured with --disable-appliance.Richard W.M. Jones2012-03-071-1/+16
|
* fish: edit: Preserve permissions, UID, GID, SELinux context when editing ↵Richard W.M. Jones2012-02-102-1/+92
| | | | files (RHBZ#788641).
* fish: In edit command, upload to a new file.Richard W.M. Jones2012-02-104-3/+110
| | | | | | | If the upload fails, this means we don't leave a partially written file. Also add a test for the edit command.
* fish: Refactor error handling in the 'edit' command.Richard W.M. Jones2012-02-101-24/+17
| | | | This is just code motion.
* fish: Fix 'test-guestfish-escapes.sh' when running an alternate guestfish ↵Richard W.M. Jones2012-01-261-12/+16
| | | | | | | | | | | binary. The error messages would be prefixed by the path to the alternate binary, eg: ../fish/guestfish: invalid escape sequence in string (starting at offset 0) Fix this by normalizing the messages further.
* fish: Filter out error messages about history file in test scriptHilko Bengen2012-01-231-1/+1
|
* Do not run appliance-related checks if not building applianceHilko Bengen2012-01-231-3/+7
|
* Replace setting of environment variables with usage of local run scriptHilko Bengen2012-01-231-3/+1
| | | | (Includes fix by RWMJ)
* fish: Remove hard-coded path from test scriptHilko Bengen2012-01-201-1/+1
|
* Tempus fugit.Richard W.M. Jones2012-01-1813-14/+14
| | | | Update all copyright dates to 2012.
* fish options parsing: Allow add_drives to be called multiple times.Richard W.M. Jones2012-01-183-10/+11
| | | | | | Ensure that the drv structure is always zeroed on allocation. Don't leak old drv->device when add_drives is called multiple times.
* fish: fix the Ctrl-\ causes guestfish to abort bug(RHBZ#596761)Wanlong Gao2012-01-041-0/+1
| | | | | | Handle SIGQUIT by guestfish, so that it can't be terminated. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* fish: mount can be used instead of mount-options with libguestfs >= 1.14Richard W.M. Jones2011-12-231-1/+1
|
* fish: Fix --format parameter in man page.Richard W.M. Jones2011-12-231-1/+1
|
* fish: Fix test-guestfish-events.sh so it works when LIBGUESTFS_DEBUG=1 is set.Richard W.M. Jones2011-12-231-7/+1
| | | | | Various messages were added and changed when this variable was set while tests were running.
* tests: Split images -> tests/data + tests/guestsRichard W.M. Jones2011-12-224-7/+7
|
* tests: Split regressions -> various subdirectories of tests/Richard W.M. Jones2011-12-2214-0/+822
|
* fish: Allow events to be processed in guestfish.Richard W.M. Jones2011-12-165-0/+292
| | | | | | | | Add 'event', 'list-events' and 'delete-event' commands so that event handlers can be registered, listed and deleted in guestfish. The event handler is a shell script snippet or host command. Cc: Pádraig Brady <P@draigBrady.com>
* fish: -i option should fail if / is not mountable, but warn about others.Richard W.M. Jones2011-12-091-1/+7
| | | | | | | | In particular this stops a problem with guestmount where if the -i option half-recognizes the guest OS, it would mount the disk (and fail, giving only warnings), leaving the mountpoint unusable. (Thanks Pádraig Brady)
* copy-in/copy-out: Wait for the tar subprocess only (RHBZ#760669).Richard W.M. Jones2011-12-071-26/+35
|
* fish: Improve error messages when no OS / multi-boot OS found with ↵Richard W.M. Jones2011-12-071-2/+30
| | | | inspection (RHBZ#760775).
* Fix rpcgen post-processing for out-of-tree buildsHilko Bengen2011-12-061-1/+1
|
* fish: When -m option fails, canonicalize device names that are printed.Richard W.M. Jones2011-11-281-0/+15
| | | | | | | | | | | The error message now looks like this: guestfish: '/dev/vda6' could not be mounted. Did you mean one of these? /dev/sda1 (ext4) /dev/vg_f15x32/lv_root (ext4) /dev/vg_f15x32/lv_swap (swap) Note that '/dev/sda1' has been canonicalized.
* fish: Rearrange code for displaying mountpoints when -m option fails.Richard W.M. Jones2011-11-281-12/+33
| | | | This also frees the list returned by guestfs_list_filesystems.
* fish: Add MD devices to guestfish device autocompletion.Matthew Booth2011-11-211-0/+3
|
* Update FSF address.Matthew Booth2011-11-0841-41/+41
|
* fish: Use size_t instead of int when counting strings.Richard W.M. Jones2011-11-011-4/+4
|
* fish and other tools: -d option uses readonlydisk="read" (RHBZ#747290).Richard W.M. Jones2011-10-261-0/+3
| | | | | | Tools like virt-edit would not be able to edit disks marked as <readonly/> in the libvirt XML. It's not clear if this is a bug or a feature.
* Flush stdout for progress bars used by guestfish, virt-resize.Richard W.M. Jones2011-10-261-0/+1
|
* valgrind: guestfish -i: free strings before exit.Richard W.M. Jones2011-10-191-0/+2
| | | | This isn't really necessary, but it keeps valgrind happy.
* fish: docs: note how to clean up the remote process properly.Richard W.M. Jones2011-10-131-5/+6
| | | | | | | Killing it is always a bad idea, because the qemu subprocess will be left hanging around. The best thing is to send the exit command. This also makes the change to virt-sysprep.
* fish: Close guestfs handle explicitly before exiting.Richard W.M. Jones2011-10-131-0/+2
| | | | | | NOTE this is just a cleanup. It is NOT necessary for correctness, since libguestfs itself is correctly closing the handle in the exit handler.
* New tool: virt-sysprep: system preparation for guests.Richard W.M. Jones2011-10-081-0/+1
|
* fish: Add man page section on calling guestfish remote robustly from bash.Richard W.M. Jones2011-10-071-0/+32
|
* New tool: virt-alignment-scan to check alignment of partitions.Richard W.M. Jones2011-10-051-0/+1
|