summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Mikhailov <mvp@users.noreply.github.com>2019-10-23 22:51:13 -0700
committerVadim Mikhailov <mvp@users.noreply.github.com>2019-10-23 22:52:44 -0700
commitd227c8326f3cbc248a7ae603e7347afe86e963ee (patch)
treecc12fada7575a6572719ee6b1c400c8ede1bc245
parent743ecf226b72bbbadc28b05ef66ff0eabddd7ab3 (diff)
Don't complain about USB permission problems if we are already root
-rw-r--r--uhubctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/uhubctl.c b/uhubctl.c
index 2fd67f8..4b81cf0 100644
--- a/uhubctl.c
+++ b/uhubctl.c
@@ -895,7 +895,7 @@ int main(int argc, char *argv[])
opt_location
);
#ifdef __gnu_linux__
- if (rc < 0) {
+ if (rc < 0 && geteuid() != 0) {
fprintf(stderr,
"There were permission problems while accessing USB.\n"
"To fix this, run this tool as root using 'sudo uhubctl',\n"