Skip to content

Instantly share code, notes, and snippets.

@enricostano
Last active Apr 28, 2016
Embed
What would you like to do?
@enricostano
Copy link
Author

enricostano commented Apr 28, 2016

open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 3
open("/proc/self/maps", O_RDONLY|O_CLOEXEC) = 3
open("/sys/class/gpio/export", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_CLOEXEC, 0666) = 3
open("/sys/class/gpio/gpio16/direction", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_CLOEXEC, 0666) = -1 EACCES (Permission denied)
open("/sys/class/gpio/unexport", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_CLOEXEC, 0666) = 3
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Error { repr: Os { code: 13, message: "Permission denied" } })', /buildslave/rust-buildbot/slave/nightly-dist-rustc-cross-host-linux/build/src/libcore/result.rs:785
note: Run with `RUST_BACKTRACE=1` for a backtrace.
+++ exited with 101 +++

@enricostano
Copy link
Author

enricostano commented Apr 28, 2016

udev rule:

SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c '\
    chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio;
    chown -R root:gpio /sys$devpath && chmod -R 770 /sys$devpath\
'"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment