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

fixing implementation of #76 since i didn't actually test it

This commit is contained in:
Robert Wolterman
2017-08-09 23:18:16 -05:00
parent 4670e44758
commit 6af974c113
6 changed files with 18 additions and 7 deletions

View File

@ -171,9 +171,10 @@ 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));
}
if (DEBUG)
if (e_no)
printf("gpio_export: something went wrong: %s\n", strerror(e_no));
close(fd);
if (s != len)
{