hush/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
..
2013-10-08 14:53:29 +02:00
2013-03-15 00:42:39 +01:00
2014-12-10 13:44:27 +01:00
2015-04-02 23:03:46 +02:00
2015-04-02 23:03:46 +02:00
2014-09-23 22:58:18 +02:00
2011-05-30 23:00:47 +02:00
2015-04-02 23:03:46 +02:00
2013-01-15 13:58:01 +01:00
2013-01-15 13:58:01 +01:00
2015-01-30 18:33:24 +01:00
2015-04-02 23:03:46 +02:00