summaryrefslogtreecommitdiffstats
path: root/fish/fish.c
Commit message (Collapse)AuthorAgeFilesLines
* avoid use of all ctype macrosJim Meyering2009-09-241-3/+3
| | | | | | | | | | | | | | | | | | | | * cfg.mk (disable_temporarily): Don't disable sc_avoid_ctype_macros. * fish/tilde.c: Remove unnecessary inclusion of ctype.h. * bootstrap: Add gnulib's c-ctype module to the list. * daemon/m4/gnulib-cache.m4: Likewise. * daemon/ext2.c: Include "c-ctype.h", not <ctype.h>. Use c_isspace, etc, rather than isspace. * daemon/guestfsd.c: Likewise. * daemon/lvm.c: Likewise. * daemon/proto.c: Likewise. * fish/fish.c: Likewise. * fish/tilde.c: Likewise. * src/generator.ml: Likewise. * src/guestfs.c: Likewise. * examples/to-xml.c: Likewise. * examples/Makefile.am (to_xml_CPPFLAGS): Add -I$(top_srcdir)/gnulib/lib so inclusion of "c-ctype.h" works. (to_xml_CPPFLAGS): Rename from to_xml_CFLAGS.
* Remove guestfs_wait_ready (turn it into a no-op).Richard Jones2009-09-211-2/+0
| | | | | | | | | | | | | | This commit changes guestfs_launch so that it both launches the appliance and waits until it is ready (ie. the daemon communicates back to us). Since we removed the pretence that we could implement a low-level asynchronous API, the need to call launch() followed by wait_ready() has looked a bit silly. Now guestfs_wait_ready() is basically a no-op. It is left in the API for backwards compatibility. Any calls to guestfs_wait_ready() can be removed from client code.
* Move decl out for C99 compliance.Richard Jones2009-09-141-1/+3
|
* guestfish: Enable grouping in string listsMatthew Booth2009-09-141-17/+133
| | | | | | | | | | | | | | | | | | | | | | This change adds the ability to group entries in a string list with single quotes. So the string: "'foo bar'" becomes 1 token rather than 2. Consequently single quotes must now be escaped: "\'" resolves to a literal single quote. Incidentally, this change also alters another, probably unintentional behaviour of the previous implementation, in that tokens are separated by any amount of whitespace rather than a single whitespace character. I.e.: "a b" resolves to: 'a' 'b' rather than: 'a' '' 'b' That last syntax can be used if an empty argument is still desired. Whitespace is now also defined to include tabs. parse_string_list can also now fail if it contains an unmatched open quote.
* build: don't define _GNU_SOURCE manuallyJim Meyering2009-08-241-2/+0
| | | | | | | | | | | | Now that we're using gnulib in earnest, any manual definition would provoke a redefinition warning. * fish/fish.c (_GNU_SOURCE): Don't define. * fish/destpaths.c (_GNU_SOURCE): Likewise. * src/guestfs.c (_GNU_SOURCE): Likewise. * bootstrap (modules): Add asprintf, strchrnul, strerror, strndup and vasprintf. * fish/fish.c (main): Set argv[0] to sanitized program_name, so functions like getopt_long that use argv[0] use the clean name.
* guestfish: diagnose stdout write failureJim Meyering2009-08-241-0/+3
| | | | | | | | Use gnulib's closeout module to ensure any failure to write to stdout is detected and reported. * fish/fish.c: Include "closeout.h". (main): Call atexit (close_stdout); * bootstrap (modules): Add closeout.
* guestfish: don't try to diagnose getopt failureJim Meyering2009-08-241-2/+0
| | | | | * fish/fish.c: ... getopt_long already does that. Instead, suggest "Try `guestfish --help' for more information."
* guestfish: write --help to stdout, use gnulib's progname moduleJim Meyering2009-08-241-44/+90
| | | | | | | | | | * fish/fish.c: Include "progname.h". (main): Call set_program_name to initialize. Don't hard-code guestfish everywhere. Use program_name. However, be careful when modifying argv[0], since it is used in the hopes that it is an absolute file name. (usage): Don't spew all of --help for a mis-typed option. Split long lines.
* fish.c: don't perform arithmetic on void* pointersJim Meyering2009-08-211-1/+2
| | | | * fish/fish.c (xwrite): Use char*.
* fish.c: avoid signed/unsigned-comparison warningJim Meyering2009-08-211-2/+2
| | | | * fish/fish.c (script): Change type of index to "unsigned int".
* fish.c: avoid "assignment discards qualifiers..." warningJim Meyering2009-08-211-1/+1
| | | | | * fish/fish.c (main): Cast-away-const. * fish/fish.h (bad_cast): Define. Safer than using an actual cast.
* guestfish: detect more failed syscallsJim Meyering2009-08-191-8/+33
| | | | * fish/fish.c (issue_command): Detect/diagnose more failed syscalls.
* adjust const "**" pointers to avoid warningsJim Meyering2009-08-171-3/+3
| | | | | | Also, ... * src/generator.ml: Add DeviceList type, and propagate that change out to all calling/interface code.
* guestfish: Add --selinux option.Richard Jones2009-08-131-2/+7
|
* Convert all TABs-as-indentation to spaces.Jim Meyering2009-08-031-230/+230
| | | | | | | | | | | Do it by running this command: [exempted files are matched via .x-sc_TAB_in_indentation] git ls-files \ | pcregrep -vf .x-sc_TAB_in_indentation \ | xargs pcregrep -l '^ *\t' \ | xargs perl -MText::Tabs -ni -le \ '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
* build: reenable "syntax-check" rule: sc_const_long_optionJim Meyering2009-08-031-1/+1
| | | | | | | * cfg.mk (disable_temporarily): Remove sc_const_long_option. * daemon/guestfsd.c (main): Declare long_options to be "const". * fish/fish.c (main): Likewise. * test-tool/test-tool.c (main): Likewise.
* guestfish: Make more strings translatable.Richard Jones2009-07-291-5/+3
| | | | | However this doesn't yet attempt to translate the POD command documentation. We need a plan to do that.
* guestfish -iv should print virt-inspector command (for debugging).Richard W.M. Jones2009-07-241-1/+3
|
* guestfish: Add tilde expansion for paths (RHBZ#511372).Richard Jones2009-07-151-1/+13
| | | | | | | | | | | | | | | | | | | This commit adds tilde expansion for local users in guestfish: ><fs> echo "~" ~ ><fs> echo ~ /home/rjones ><fs> echo ~foo ~foo ><fs> echo ~rjones/bar /home/rjones/bar ><fs> echo ~roo ~roo ><fs> echo ~root/foo /root/foo ><fs> echo ~root /root
* Guestfish feature: remote control of guestfish over a pipe.Richard Jones2009-07-141-6/+62
| | | | | | | | | | | | | | | | | The use case is to have a long-running guestfish process in a shell script, and thus to avoid the overhead of starting guestfish each time. Do: eval `guestfish --listen` guestfish --remote somecmd guestfish --remote someothercmd guestfish --remote exit This patch also supports having multiple guestfish processes at the same time. The protocol is simple XDR messages over a Unix domain socket.
* Guestfish: implement -x option, echo commands before executing them.Richard W.M. Jones2009-07-111-2/+15
|
* Fix: '-D' was not recognized as a parameter to guestfish.Richard W.M. Jones2009-07-111-1/+1
|
* Guestfish: Add 'reopen' command to reopen the libguestfs handle.Richard W.M. Jones2009-07-111-4/+15
|
* Add missing documentation for "more" command in guestfish help output.Richard W.M. Jones2009-07-111-0/+2
|
* guestfish: Always fflush stdout between commands.Richard Jones2009-07-061-1/+5
|
* remove trailing blanksJim Meyering2009-07-031-1/+1
|
* Add the guestfish 'time' command.Richard W.M. Jones2009-07-021-0/+10
| | | | | ><fs> time sfdisk /dev/sda 0 0 0 , elapsed time: 6.12 seconds
* Implement "more" and "less" commands in guestfish.Richard W.M. Jones2009-06-291-0/+36
| | | | | | | | Use commands such as: more /etc/passwd less /etc/fstab These commands are specific to guestfish.
* Guestfish pipes.Richard W.M. Jones2009-06-281-15/+71
|
* Quote command line arguments to virt-inspector.Richard W.M. Jones2009-06-241-1/+2
|
* Added guestfish -i option to run virt-inspector.Richard W.M. Jones2009-06-241-2/+58
| | | | | | You can invoke guestfish with: guestfish -i libvirt-domain guestfish -i disk-image(s)
* Implement guestfish -f option to allow guestfish scripts.Richard W.M. Jones2009-06-241-2/+21
| | | | | New '-f' option allows scripts to be written using: #!/usr/bin/guestfish -f
* Add 'glob' command for guestfish.Richard Jones2009-06-221-2/+12
|
* Add tab-completion of guest filenames (currently disabled).Richard Jones2009-06-181-0/+16
|
* Added 'lcd' command to guestfish.Richard Jones2009-06-081-0/+11
|
* use add_drive_ro for --mount parameters from guestfish when called with --roCharles Duffy2009-06-021-2/+35
| | | | | | | | | | | | To prevent writes (such as ext3 journal replay) from occuring even when --ro is passed, guestfish should use add_drive_ro() for any drives specified on the command line with --add if --ro is also passed. As we need to look through the entire command line for --ro before adding any drives, we move the add process out of the argument-parsing loop and into its own function, patterned off mount_mps(). Signed-off-by: Charles Duffy <charles_duffy@dell.com>
* Move the appliance and build scripts into new appliance/ subdirectory.Richard W.M. Jones2009-05-281-4/+5
|
* Gettextize the source, make library strings translatable.Richard Jones2009-05-211-83/+84
|
* Implement -command (to ignore errors) in guestfish, and allow recovery from ↵Richard Jones2009-05-081-12/+24
| | | | qemu process failure.
* Missing include <ctype.h>Richard Jones2009-05-061-0/+1
|
* Implement !local in guestfish.Richard W.M. Jones2009-05-011-0/+16
|
* Added guestfish 'echo' command.1.0.16Richard Jones2009-04-301-0/+9
|
* Added a comment syntax to guestfish (# ...).Richard Jones2009-04-301-0/+5
|
* Add --version option (show version) to guestfish.Richard Jones2009-04-261-1/+7
|
* Added the --ro option (readonly) to guestfish.Richard Jones2009-04-261-3/+15
|
* Don't echo output in scripts.Richard Jones2009-04-261-10/+12
|
* If LIBGUESTFS_PATH is set, guestfish shouldn't modify the path.Richard Jones2009-04-251-1/+5
|
* Fix buffer overrun in guestfish command-line parsing.Richard W.M. Jones2009-04-231-2/+2
|
* 'guestfish edit' commands and several bugfixes.Richard Jones2009-04-151-3/+28
|
* Move guestfish 'alloc' command to a separate file.Richard Jones2009-04-151-82/+2
|