[PATCH] lineedit: skip non-executables when tab-completing commands

2015-05-29 Thread Ron Yorston
Of course, on *nix systems there are probably very few non-executables in directories on PATH. Signed-off-by: Ron Yorston --- libbb/lineedit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 2ddb2b6..1fd0dbc 100644 --- a/libbb/lineedit.c +++ b/lib

[PATCH] which: search applet table in standalone shell mode

2015-05-29 Thread Ron Yorston
function old new delta which_main 245 276 +31 -- (add/remove: 0/0 grow/shrink: 1/0 up/down: 31/0) Total: 31 b

[PATCH] lineedit: search applets as well as PATH for tab completion

2015-05-29 Thread Ron Yorston
In standalone shell mode search the applet table as well as PATH when tab completing a command. Use a stupid linear search: we're also about to read all the directories on PATH so efficiency isn't a big concern. function old new delta add_match

[PATCH v3 4/4] i2cdump: code rework

2015-05-29 Thread Bartosz Golaszewski
Split i2cdump_main() into shorter functions. Simplify the code a bit. Make block an array of ints so that we can store negative results of read functions (fixes a bug found by Denys Vlasenko). Signed-off-by: Bartosz Golaszewski --- miscutils/i2c_tools.c | 316 ++--

[PATCH v3 2/4] i2cdetect: don't scan non-regular addresses without the '-a' option

2015-05-29 Thread Bartosz Golaszewski
Addresses 0x00-0x02 shouldn't be scanned by default. This patch makes 'first' default to 0x03 and only enables lower addresses if '-a' option is passed Signed-off-by: Bartosz Golaszewski --- miscutils/i2c_tools.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/miscutils

[PATCH v3 0/4] i2c-tools fixes

2015-05-29 Thread Bartosz Golaszewski
This series fixes one major issue and two smaller bugs in i2cdetect and reworks i2cdump_main(). v3: - drop the check for COMMON_BUFSIZE < block buffer size as it's highly unlikely, isn't it? v2: - added i2cdump code rework to the series - fixed an unneeded indentation in i2cdetect Bartosz Gola

[PATCH v3 3/4] i2cdetect: add a check for (mode == DETECT_MODE_AUTO)

2015-05-29 Thread Bartosz Golaszewski
We should only warn the user about addresses to be skipped if (mode == DETECT_MODE_AUTO). Signed-off-by: Bartosz Golaszewski --- miscutils/i2c_tools.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c index 6f97872..16784e9 10064

[PATCH v3 1/4] i2cdetect: don't die on addresses already in use by drivers

2015-05-29 Thread Bartosz Golaszewski
We can't use i2c_set_slave_addr() in i2cdetect, as we have to check for EBUSY after calling ioctl(I2C_SLAVE) and print 'UU' on busy addresses instead of bailing-out. While we're at it: reorder definitions of local vars in i2cdetect_main(). function old

[PATCH] lineedit: trivial codeshrink for vi-mode

2015-05-29 Thread Natanael Copa
Introduce and use BB_isalnum_or_underscore(). bloatcheck on x86_64: function old new delta BB_isalnum_or_underscore - 46 +46 vi_end_motion176 166 -10 vi_back_mot