Created
November 6, 2015 09:04
-
-
Save thomasphorton/c17dc3bff6ff08348799 to your computer and use it in GitHub Desktop.
quick2wire-gpio-admin diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/gpio-admin.c b/src/gpio-admin.c | |
index 38569bb..faea863 100644 | |
--- a/src/gpio-admin.c | |
+++ b/src/gpio-admin.c | |
@@ -27,7 +27,7 @@ static void usage_error(char **argv) { | |
static void allow_access_by_user(unsigned int pin, const char *filename) { | |
char path[PATH_MAX]; | |
- int size = snprintf(path, PATH_MAX, "/sys/devices/virtual/gpio/gpio%u/%s", pin, filename); | |
+ int size = snprintf(path, PATH_MAX, "/sys/class/gpio/gpio%u/%s", pin, filename); | |
if (size >= PATH_MAX) { | |
error(7, 0, "path of GPIO pin is too long!"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment