summaryrefslogtreecommitdiffstats
path: root/fish
Commit message (Collapse)AuthorAgeFilesLines
* fish: Don't fail if -m and --listen flags are both given (RHBZ#612178).Richard Jones2010-07-071-0/+11
| | | | | | | | | | | | | Testing this against a Fedora disk image: $ ./fish/guestfish --ro -a F13.img -m /dev/sda1 --listen export GUESTFISH_PID=6033 $ ./fish/guestfish --remote=6033 -- ping-daemon $ ./fish/guestfish --remote=6033 -- ping-daemon $ ./fish/guestfish --remote=6033 -- exit Without this fix the first remote command would fail because qemu would have already been killed.
* fish: help command return error for non-existent commands (RHBZ#597145).Richard Jones2010-06-022-25/+57
| | | | | | | | | | | | | | With this change, the exit status indicates error for non-existent commands. $ guestfish -h foo foo: command not known, use -h to list all commands $ echo $? 1 $ guestfish help foo foo: command not known, use -h to list all commands $ echo $? 1
* Add bash complation script to EXTRA_DIST.Richard Jones2010-05-251-1/+2
|
* fish: First pass at guestfish bash completion script.Richard Jones2010-05-252-1/+96
|
* fish: Don't eat words when completing case-insensitive paths (RHBZ#582993).Richard Jones2010-05-253-1/+37
|
* fish: Sort returned paths so the list is stable across multiple calls.Richard Jones2010-05-251-0/+11
|
* fish: Document test1.img, test2.img etc used by -N option in FILES section.Richard Jones2010-05-251-0/+9
|
* fish: Create a separate FILES section in the manpage.Richard Jones2010-05-251-2/+27
|
* fish: Move 'EXIT CODE' section to a more logical place in the documentation.Richard Jones2010-05-251-5/+5
|
* fish: Make the read/write warning more prominent.Richard Jones2010-05-251-5/+7
| | | | | Follow the example on other manual pages by making the warning more prominent.
* fish: New command: 'supported'Richard Jones2010-05-255-0/+110
| | | | | | | | | | | | | | | | | | | | | | | | This checks all available optional groups and prints out which ones are supported by the daemon. Note you must launch the appliance first. Example: ><fs> supported augeas yes inotify yes linuxfsuuid yes linuxmodules yes linuxxattrs yes lvm2 yes mknod yes ntfs3g yes ntfsprogs yes realpath yes scrub yes selinux yes xz yes zerofree yes
* fish: Allow suffixes on number parameters (eg. 1M)Richard Jones2010-05-213-113/+107
| | | | | | | | | | | | | | | | This small change uses the gnulib xstrtoll functionality to enable suffixes on integer parameters in guestfish. For example: truncate-size /file 1G (previously you would have had to given the full number). This also applies to the 'alloc' and 'sparse' commands (and indirectly to the -N option). The specification for these commands has changed slightly, in that 'alloc foo 1MB' would now use SI units, allocating 1000000 bytes instead of a true megabyte. All existing uses would use 'alloc foo 1M' which still allocates true megabytes.
* fish: Fix '-N part' disk partition type sub-option.Richard Jones2010-05-211-1/+1
|
* New API: write for creating files with fixed content (RHBZ#501889).Richard Jones2010-05-203-4/+4
| | | | | | | | | | | | | 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.
* fish: Fix build error if built without readline.Richard Jones2010-05-201-2/+4
| | | | | | fish.c:1447: error: 'add_history_line' defined but not used [-Wunused-function] (Reported by Matt Booth)
* guestfish: Fix build error in 'print_shell_quote' function.Richard Jones2010-05-131-1/+1
| | | | | Amend commit 1c6ed48bd3cd471dc so the prototype of 'print_shell_quote' function is correct.
* fish: Fix guestfish -N option when called with unknown image type.Richard Jones2010-05-131-3/+5
| | | | | Previously it was falling off the end of the loop if you called it with an unknown image type.
* guestfish -i and virt-inspector work on filenames containing spaces ↵Richard Jones2010-05-131-24/+81
| | | | | | | | | | | | | | (RHBZ#507810). This commit fixes a long-standing bug which prevented guestfish -i and virt-inspector from working on disk images which had a space in the filename (or other unsafe characters). It works by ensuring that the strings passed between guestfish -i and virt-inspector are quoted correctly in both directions. Note that this commit adds a dependency from virt-inspector to the perl module String::ShellQuote. We have previously used this module in virt-make-fs.
* fish: With both '-x' and '-i', pass through '-x' to inferior process.Richard Jones2010-05-121-0/+2
|
* Revert "fish: Add 'please wait' message when launching (and interactive)."Richard Jones2010-05-081-2/+0
| | | | This reverts commit 01fedcde05c930c1413e9fe0909fa1da1f360cdf.
* fish: Add 'please wait' message when launching (and interactive).Richard Jones2010-05-081-0/+2
|
* fish: Make 'launch' function static.Richard Jones2010-05-082-14/+12
| | | | | | This commit makes the launch function static and private to 'fish.c', and changes the generator so the function is no longer called for the 'run/launch' command.
* fish: In 'reopen' copy trace setting to new handle.Richard Jones2010-05-081-0/+4
|
* fish -N option unconditionally overwrites test*.img files.Richard Jones2010-05-082-7/+1
| | | | | This is more convenient and makes it consistent with the 'alloc' and 'sparse' commands.
* fish: Make '-x' option enable traces instead of using separate echo path.Richard Jones2010-05-081-9/+1
| | | | | | Previously we had separate code paths for echoing commands (-x) and tracing (guestfs_set_trace). This just unifies that so that the guestfish -x option enables tracing.
* fish: Add 'man' command which opens the manual.Richard Jones2010-04-245-4/+86
|
* docs: Routine refresh of the documentation for guestfs(3) and guestfish(1).Richard Jones2010-04-241-36/+36
|
* fish: Fix segfault in '-a' option.Richard Jones2010-04-231-1/+2
| | | | | This fixes a segfault in the guestfish -a option which you would get when using guestfish 1.3.6.
* fish: Add -N option for making prepared disk images.Richard Jones2010-04-226-91/+514
| | | | | | | | | | | | | | | | | Previously you might have typed: $ guestfish ><fs> alloc test1.img 100M ><fs> run ><fs> part-disk /dev/sda mbr ><fs> mkfs ext4 /dev/sda1 now you can do the same with: $ guestfish -N fs:ext4 Some tests have also been updated to use this new functionality.
* fish docs: Be consistent about using I<-..> for options.Richard Jones2010-04-221-4/+4
|
* fish docs: Use L</...> for internal links in the man page.Richard Jones2010-04-221-6/+6
|
* fish: Allow -<<END as a syntax for uploading "heredocs".Richard Jones2010-04-193-0/+177
| | | | | | | | | | | | For example: ><fs> upload -<<END /foo some data some more data END ><fs> cat /foo some data some more data
* docs: Add virt-resize(1) link to guestfish(1) manpage.Richard Jones2010-04-191-0/+1
|
* fish: Autocomplete 'sparse' command (RHBZ#582899).Richard Jones2010-04-171-0/+1
| | | | | I also rechecked the list of built-in commands against the actual commands to make sure no others were omitted.
* fish: Print output from some commands in octal/hex as approp. (RHBZ#583242).Richard Jones2010-04-171-1/+3
|
* fish: Allow '-' prefix on command line to override exit on error (RHBZ#578407).Richard Jones2010-04-131-2/+13
| | | | | | | | | | | | | | | Allow -cmd on the command line to mean that normal exit on error behaviour is overridden, ie. we will not exit. This allows you to do: guestfish -- command : -command : command with the second command allowing errors. (Note that '--' is required to stop getopt parsing -command as an option). Also this fixes the remote case which is what the original bug report was about.
* fish: Update documentation: Add another pipe example.Richard Jones2010-04-131-0/+1
|
* fish: Update documentation: Using 'lcd' command to change local directory.Richard Jones2010-04-131-0/+3
|
* Documentation updates.Richard Jones2010-04-111-2/+6
| | | | | | | Fix copyright years. Fix URLs to point to new PRC site. Make sure guestfish(1) and guestfs(3) manpages reference the current list of tools.
* fish: Print extended help when the user types an unknown command first.Richard Jones2010-04-072-0/+21
| | | | | | | | $ guestfish /tmp/disk.img /tmp/disk.img: unknown command Did you mean to open a disk image? guestfish -a disk.img For a list of commands: guestfish -h For complete documentation: man guestfish
* Check error returns from posix_fallocate (RHBZ#579664).Richard Jones2010-04-071-1/+4
| | | | | | | | | | | | | | | | | | | | | posix_fallocate has a non-standard way to return error indications. Thus all our calls to posix_fallocate were effectively unchecked. For example: $ guestfish alloc test.img 1P $ echo $? 0 $ ll test.img -rw-rw-r--. 1 rjones rjones 0 2010-04-06 11:02 test.img $ rm test.img With this change, errors are detected and reported properly: $ ./fish/guestfish alloc test.img 1P fallocate: File too large This is a fix for: https://bugzilla.redhat.com/show_bug.cgi?id=579664
* Mac OS X: setlocale function requires <locale.h> header file.Richard Jones2010-03-221-0/+1
|
* Mac OS X: implement readline functions.Richard Jones2010-03-221-0/+4
| | | | | OS X has an older version of readline with some differences in the names of functions.
* Mac OS X: provide alternate implementation of posix_fallocate.Richard Jones2010-03-221-0/+19
|
* Mac OS X: Detect bindtextdomain.Richard Jones2010-03-221-0/+7
| | | | | These are missing on Mac OS X. I think you would need to install a gettext package to get these.
* Use mount-options instead of mount to avoid implicit -o sync.Richard Jones2010-02-101-4/+7
| | | | | | | | | | | | | | | 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.
* Set locale in C programs so l10n works (RHBZ#559962).Richard Jones2010-01-292-0/+5
| | | | | | | | | | | | | | | 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).
* guestfish: Use xstrtol to parse integers (RHBZ#557655).Richard Jones2010-01-251-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current code uses atoi to parse the generator Int type and atoll to parse the generator Int64 type. The problem with the ato* functions is that they don't cope with errors very well, and they cannot parse numbers that begin with 0.. or 0x.. for octal and hexadecimal respectively. This replaces the atoi call with a call to Gnulib xstrtol and the atoll call with a call to Gnulib xstrtoll. The generated code looks like this for all Int arguments: { strtol_error xerr; long r; xerr = xstrtol (argv[0], NULL, 0, &r, ""); if (xerr != LONGINT_OK) { fprintf (stderr, _("%s: %s: invalid integer parameter (%s returned %d)\n"), cmd, "memsize", "xstrtol", xerr); return -1; } /* The Int type in the generator is a signed 31 bit int. */ if (r < (-(2LL<<30)) || r > ((2LL<<30)-1)) { fprintf (stderr, _("%s: %s: integer out of range\n"), cmd, "memsize"); return -1; } /* The check above should ensure this assignment does not overflow. */ memsize = r; } and like this for all Int64 arguments (note we don't need the range check for these): { strtol_error xerr; long long r; xerr = xstrtoll (argv[1], NULL, 0, &r, ""); if (xerr != LONGINT_OK) { fprintf (stderr, _("%s: %s: invalid integer parameter (%s returned %d)\n"), cmd, "size", "xstrtoll", xerr); return -1; } size = r; } Note this also fixes an unrelated bug in guestfish handling of RBufferOut. We were using 'fwrite' without checking the return value, and this could have caused silent failures, eg. in the case where there was not enough disk space to store the resulting file, or even if the program was interrupted (but continued) during the write. Replace this with Gnulib 'full-write', and check the return value and report errors.
* Add guestfs.pod and guestfish.pod to EXTRA_DIST.1.0.81Richard Jones2010-01-131-1/+2
|
* Move guestfs(3) and guestfish(1) man pages into subdirectories.Richard Jones2009-12-312-1/+768
| | | | | | | | These manual pages have for a very long time 'lived' in the top source directory. Clean up this situation by moving those manual pages (plus associated generated files) into the src/ and fish/ subdirectories respectively.