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:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user