Richard W.M. Jones
489cb059c2
fish: Don't segfault here is 'words' happens to be NULL (found by Coverity).
2012-12-08 16:42:37 +00:00
Richard W.M. Jones
2d220f5da2
tools: Modify existing tools to use guestfs_{push,pop}_error_handler.
...
This is a shorter and more convenient way to disable errors
temporarily across calls.
2012-11-09 19:51:09 +00:00
Matthew Booth
0cdd944474
fish: Add MD devices to guestfish device autocompletion.
2011-11-21 15:23:18 +00:00
Matthew Booth
04ea1375c5
Update FSF address.
2011-11-08 14:43:07 +00:00
Richard W.M. Jones
4d4d3b2498
fish: Show device mapper device in tab completion (RHBZ#688062).
...
With this change:
><fs> luks-open /dev/vda1 lukstest
Enter key or passphrase ("key"):
><fs> ll /dev/<TAB>
/dev/mapper/lukstest /dev/vda /dev/vda1
2011-07-12 18:44:45 +01:00
Richard Jones
21bd2db7cf
fish: Don't eat words when completing case-insensitive paths (RHBZ#582993).
2010-05-25 13:59:44 +01:00
Richard Jones
53c3b9d2b0
fish: Sort returned paths so the list is stable across multiple calls.
2010-05-25 13:52:53 +01:00
Richard Jones
aa4fffd512
Fix compilation if readline library is not present.
2009-11-10 16:32:20 +00:00
Jim Meyering
c9d9498458
change strncasecmp() == 0 to STRCASEEQLEN()
...
git grep -l 'strncasecmp *([^=]*== *0'|xargs \
perl -pi -e 's/\bstrncasecmp( *\(.*?\)) *== *0\b/STRCASEEQLEN$1/g'
2009-11-09 22:42:02 +01:00
Jim Meyering
539bf7e898
use STREQ, not strcmp: part 2
...
git grep -l 'strcmp *([^=]*!= *0'|xargs \
perl -pi -e 's/\bstrcmp( *\(.*?\)) *!= *0\b/STRNEQ$1/g'
2009-11-09 22:34:16 +01:00
Jim Meyering
9a8889e4d0
use STREQ, not strcmp: part 1
...
git grep -l 'strcmp *([^=]*== *0'|xargs \
perl -pi -e 's/\bstrcmp( *\(.*?\)) *== *0/STREQ$1/g'
2009-11-09 22:34:16 +01:00
Jim Meyering
3e70b34eed
change strncmp() == 0 to STREQLEN()
...
git grep -l 'strncmp *([^=]*== *0'|xargs \
perl -pi -e 's/\bstrncmp( *\(.*?\)) *== *0\b/STREQLEN$1/g'
2009-11-09 22:34:16 +01:00
Jim Meyering
8817709009
build: don't define _GNU_SOURCE manually
...
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.
2009-08-24 18:15:13 +02:00
Jim Meyering
fad78c6094
destpaths.c: avoid signed/unsigned-comparison warning
...
* fish/destpaths.c (free_words): Change param type: s/int/size_t/.
2009-08-21 15:24:25 +02:00
Richard Jones
690472768c
Fix: segfault in tab completion (RHBZ#516024).
...
Actually this fixes two bugs: 'strs' was not being freed on every
path, and the tab completion segfault described in the bug report.
2009-08-06 15:03:56 +01:00
Jim Meyering
2f1a50d816
Convert all TABs-as-indentation to spaces.
...
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 : $_'
2009-08-03 17:17:57 +02:00
Richard W.M. Jones
2018441f42
Guestfish tab-completion on destination paths, fixed this time.
...
Tab-completion on destination paths should now work correctly.
2009-07-03 12:02:21 +01:00
Jim Meyering
f20854ec61
fish: handle some out-of-memory conditions
...
* 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.
2009-07-01 18:42:19 +02:00
Richard Jones
e395d7db8f
Add tab-completion of guest filenames (currently disabled).
2009-06-18 21:06:22 +01:00