From d227c8326f3cbc248a7ae603e7347afe86e963ee Mon Sep 17 00:00:00 2001 From: Vadim Mikhailov Date: Wed, 23 Oct 2019 22:51:13 -0700 Subject: Don't complain about USB permission problems if we are already root --- uhubctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" -- cgit v1.2.3