iterators: improve error checking
authorBartosz Golaszewski <bartekgola@gmail.com>
Wed, 11 Jan 2017 09:52:13 +0000 (10:52 +0100)
committerBartosz Golaszewski <bartekgola@gmail.com>
Wed, 11 Jan 2017 09:52:13 +0000 (10:52 +0100)
commit669923dedb0a13c2c8b834947863dd4d663249f6
tree0b23dd62e92b4e8295b5a16b01a05645c9e9b382
parent474a97f84675849621cbfc1129ea5e2db487b50b
iterators: improve error checking

Add new functions that allow to check if opening a gpiochip device
file from an iterator routine failed or if we're done iterating over
all gpiochips present on the system.

Use them in the relevant foreach macro and gpiodetect.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
core.c
gpiod.h
gpiodetect.c