| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -87,7 +87,10 @@ public LED(String dev) { | |||
| 87 | 87 | String fn = "/sys/class/leds/" + dev + "/trigger"; | |
| 88 | 88 | int ret = NativeInterface.writeFile(fn, "none"); | |
| 89 | 89 | if (ret < 0) { | |
| 90 | - throw new RuntimeException(fn + ": " + NativeInterface.getError(ret)); | ||
| 90 | + if (ret == -13) { // EACCES | ||
| 91 | + System.err.println("You might need to install a custom udev rule to allow regular users to modify /sys/class/leds/*."); | ||
| 92 | + } | ||
| 93 | + throw new RuntimeException(NativeInterface.getError(ret)); | ||
| 91 | 94 | } | |
| 92 | 95 | } | |
| 93 | 96 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments