busybox/miscutils
Bartosz Golaszewski 7ca5c51cc8 i2c-tools: only try /dev/i2c/* if opening /dev/i2c-* fails with ENOENT
Trying to access /dev/i2c/* on every error after opening /dev/i2c-* can
mislead users who e.g. don't have root access. Instead of bailing-out
with "permission denied" we currently print "no such file or directory".

Fix it by trying open("/dev/i2c/%d") only if we got ENOENT.

Upstream i2cdetect tries to get any info it can from /sys and /proc even
when invoked by an unprivileged user, but we don't want to add unnecessary
bloat.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-05-11 17:26:27 +02:00
..
adjtimex.c adjtimex: make its help text and printed data a bit less cryptic 2014-04-17 11:29:34 +02:00
bbconfig.c
beep.c
chat.c fix assorted unused code and wrong format specs found by cppchekc (bug 6716) 2013-11-29 16:43:33 +01:00
chrt.c
Config.src taskset: support CPU masks for more than 64 CPUs 2014-08-17 19:36:22 +02:00
conspy.c
crond.c libbb: introduce and use is_prefixed_with() 2015-03-12 17:48:34 +01:00
crontab.c
dc.c libbb: introduce and use is_prefixed_with() 2015-03-12 17:48:34 +01:00
devfsd.c libbb: introduce and use is_prefixed_with() 2015-03-12 17:48:34 +01:00
devmem.c
eject.c
fbsplash.c libbb: introduce and use is_prefixed_with() 2015-03-12 17:48:34 +01:00
fbsplash.cfg
flash_eraseall.c
flash_lock_unlock.c
flashcp.c flashcp: change BUFSIZE to 4k 2014-12-10 13:44:27 +01:00
hdparm.c Use unsigned printf/scanf conversion where more appropriate 2013-11-29 16:45:45 +01:00
i2c_tools.c i2c-tools: only try /dev/i2c/* if opening /dev/i2c-* fails with ENOENT 2015-05-11 17:26:27 +02:00
inotifyd.c
ionice.c
Kbuild.src taskset: support CPU masks for more than 64 CPUs 2014-08-17 19:36:22 +02:00
last_fancy.c *: Switch to POSIX utmpx API 2015-04-02 23:03:46 +02:00
last.c *: Switch to POSIX utmpx API 2015-04-02 23:03:46 +02:00
less.c less: make -E work 2014-09-23 22:58:18 +02:00
makedevs.c
man.c libbb: introduce and use is_prefixed_with() 2015-03-12 17:48:34 +01:00
microcom.c
mountpoint.c
mt.c
nandwrite.c nanddump: don't show --bb in usage when disabled 2014-12-18 11:55:08 +01:00
raidautorun.c
readahead.c
rfkill.c rfkill: use new-style config/kbuild/applet 2013-11-20 14:21:29 +01:00
runlevel.c *: Switch to POSIX utmpx API 2015-04-02 23:03:46 +02:00
rx.c
setserial.c
setsid.c
strings.c
taskset.c taskset: fix logic error in "if it doesn't start with 0x..." 2014-08-31 01:35:45 +02:00
time.c
timeout.c
ttysize.c
ubi_tools.c ubiattach: add option -O 2015-01-30 18:33:24 +01:00
volname.c
wall.c *: Switch to POSIX utmpx API 2015-04-02 23:03:46 +02:00
watchdog.c