summaryrefslogtreecommitdiffstats
path: root/fish
Commit message (Collapse)AuthorAgeFilesLines
* build: don't define _GNU_SOURCE manuallyJim Meyering2009-08-242-4/+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-242-45/+92
| | | | | | | | | | * 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/: enable -Werror and all of gcc's warning optionsJim Meyering2009-08-211-2/+2
| | | | * fish/Makefile.am: Use $(WARN_CFLAGS) $(WERROR_CFLAGS).
* destpaths.c: avoid signed/unsigned-comparison warningJim Meyering2009-08-211-1/+1
| | | | * fish/destpaths.c (free_words): Change param type: s/int/size_t/.
* 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-212-1/+7
| | | | | * fish/fish.c (main): Cast-away-const. * fish/fish.h (bad_cast): Define. Safer than using an actual cast.
* tilde.c: avoid a warningJim Meyering2009-08-211-5/+3
| | | | | * fish/tilde.c (find_home_for_username): Change param type: s/int/size_t/ (try_tilde_expansion): Adjust caller.
* fish.c: avoid warningsJim Meyering2009-08-212-3/+1
| | | | | * fish/rc.c (UNIX_PATH_MAX): Remove unused definition. * fish/fish.h (rc_listen): Declare with __attribute__((noreturn)).
* edit.c: avoid warning about signed/unsigned comparisonJim Meyering2009-08-211-2/+3
| | | | | * fish/edit.c (load_file): Change type of param from int to size_t. (do_edit): Adjust caller.
* guestfish: detect more failed syscallsJim Meyering2009-08-191-8/+33
| | | | * fish/fish.c (issue_command): Detect/diagnose more failed syscalls.
* avoid compiler warnings about unused vars in generated codeJim Meyering2009-08-181-2/+10
| | | | | | | * fish/Makefile.am: Compile rc_protocol.c into a convenience library, so it can have its own CFLAGS, and link that into guestfish. generator.ml: Use TABs, not spaces for indentation.
* adjust const "**" pointers to avoid warningsJim Meyering2009-08-172-6/+6
| | | | | | 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
|
* fish: don't read freed memoryJim Meyering2009-08-121-4/+4
| | | | | | | * fish/rc.c (rc_remote): Close file handle only *after* xdr_destroy, because that latter may flush its file handle (implicated via xdrstdio_create). FYI, this failure is triggered for me only when MALLOC_PERTURB_ is set to nonzero < 256 in my environment.
* Fix: segfault in tab completion (RHBZ#516024).Richard Jones2009-08-061-2/+2
| | | | | Actually this fixes two bugs: 'strs' was not being freed on every path, and the tab completion segfault described in the bug report.
* Convert all TABs-as-indentation to spaces.Jim Meyering2009-08-037-361/+361
| | | | | | | | | | | 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-292-6/+4
| | | | | 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
|
* More misc fixes for non-srcdir builds.Richard Jones2009-07-161-3/+9
|
* guestfish: Add tilde expansion for paths (RHBZ#511372).Richard Jones2009-07-154-1/+138
| | | | | | | | | | | | | | | | | | | 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
* File missing from tarball: rc_protocol.xRichard W.M. Jones2009-07-141-0/+3
|
* Guestfish feature: remote control of guestfish over a pipe.Richard Jones2009-07-145-7/+395
| | | | | | | | | | | | | | | | | 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-114-4/+90
|
* 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
|
* Make it possible to build in a separate directoryMatthew Booth2009-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | This patch allows you to do: mkdir build cd build ../configure ... make This will output all generated files to the build directory. Given that autogen automatically runs configure, you can also do: BUILDDIR=./build ./autogen.sh which will do the right thing. Also: * Fix a dependency bug which means that guestfs_protocol.h isn't automatically rebuilt. * Re-running autogen.sh with no arguments won't blow away your previous configure arguments.
* remove trailing blanksJim Meyering2009-07-038-8/+8
|
* Guestfish tab-completion on destination paths, fixed this time.Richard W.M. Jones2009-07-031-49/+74
| | | | Tab-completion on destination paths should now work correctly.
* Add the guestfish 'time' command.Richard W.M. Jones2009-07-024-9/+78
| | | | | ><fs> time sfdisk /dev/sda 0 0 0 , elapsed time: 6.12 seconds
* Remove generated code from git.Richard W.M. Jones2009-07-022-4111/+0
| | | | | | | | Git users now require the OCaml compiler in order to regenerate the generated code after a checkout. Generated code will remain in the tarball, so users of the source tarball will not need the OCaml compiler.
* Add 'readdir' call.Richard W.M. Jones2009-07-022-0/+40
| | | | | | | | | | | | This adds a readdir call (mostly intended for programs). The return value is a list of guestfs_dirent structures. This adds the new types 'struct guestfs_dirent' and 'struct guestfs_dirent_list', along with all the code to return these in the different language bindings. Also includes additional tests for OCaml and Perl bindings to test this.
* fish: handle some out-of-memory conditionsJim Meyering2009-07-011-29/+62
| | | | | | | | | | | | | * fish/destpaths.c (xalloc_oversized): Define. (complete_dest_paths_generator): Use size_t as type for a few variables, rather than int. Don't deref NULL or undef on failed heap alloc. Don't leak on failed realloc. Detect theoretical overflow when count_strings returns a very large number of strings. Handle asprintf failure. (APPEND_STRS_AND_FREE): Rewrite as do {...}while(0), so that each use can/must be followed by a semicolon. Better for auto-formatters.
* Generated code for the virtio_blk change.Richard W.M. Jones2009-07-011-3/+3
|
* Generated code for mknod, mkfifo, mknod_b, mknod_c, umask.Richard W.M. Jones2009-06-302-0/+132
|
* Generated code for 'set_memsize'/'get_memsize' calls.Richard W.M. Jones2009-06-302-0/+45
|
* Generated code for the 'mkswap*' commands.Richard W.M. Jones2009-06-292-0/+70
|
* Generated code for mount-loop command.Richard W.M. Jones2009-06-292-0/+24
|
* Generated code for 'initrd-list'.Richard W.M. Jones2009-06-292-0/+25
|
* Generated code for 'du' command.Richard W.M. Jones2009-06-292-0/+24
|
* Generated code for df / df-h.Richard W.M. Jones2009-06-292-0/+46
|
* Implement "more" and "less" commands in guestfish.Richard W.M. Jones2009-06-295-20/+137
| | | | | | | | Use commands such as: more /etc/passwd less /etc/fstab These commands are specific to guestfish.
* Generated code for head/tail commands.Richard W.M. Jones2009-06-292-4/+108
|
* Generated code for 'wc_*' commands.Richard W.M. Jones2009-06-292-0/+72
|
* Guestfish pipes.Richard W.M. Jones2009-06-283-17/+73
|