1
0
mirror of https://github.com/xtacocorex/CHIP_IO synced 2025-07-20 04:43:21 +00:00

adding code to close #76

This commit is contained in:
Robert Wolterman
2017-08-07 22:06:15 -05:00
parent 1e3935c8ea
commit 35619e5baf

View File

@ -171,6 +171,9 @@ int gpio_export(int gpio)
len = snprintf(str_gpio, sizeof(str_gpio), "%d", gpio); BUF2SMALL(str_gpio);
ssize_t s = write(fd, str_gpio, len); e_no = errno;
if (DEBUG) && (e_no) {
printf("gpio_export: something went wrong: %s\n", strerror(e_no));
}
close(fd);
if (s != len)
{