aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2017-06-30 10:42:54 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2017-06-30 10:42:54 +0200
commit7a9191633ede9f0d02ddfddad69bcd210f5cbac2 (patch)
tree1aaa6fba4e262cad51a99a58c6061690d43b83a3
parent9737d21262d03cc802a93f4cd64a240537430bd9 (diff)
downloadusbreset-7a9191633ede9f0d02ddfddad69bcd210f5cbac2.tar.gz
usbreset-7a9191633ede9f0d02ddfddad69bcd210f5cbac2.tar.bz2
usbreset-7a9191633ede9f0d02ddfddad69bcd210f5cbac2.tar.xz
usbreset-7a9191633ede9f0d02ddfddad69bcd210f5cbac2.zip
o Better output so I don't have to remember the usage syntax.
-rw-r--r--.gitignore1
-rw-r--r--src/usbreset.cpp5
2 files changed, 5 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 7d303bd..5a206f7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
*build
+.idea
diff --git a/src/usbreset.cpp b/src/usbreset.cpp
index 76c30c0..41e00e9 100644
--- a/src/usbreset.cpp
+++ b/src/usbreset.cpp
@@ -16,7 +16,10 @@ int main(int argc, char **argv)
int rc;
if (argc != 2) {
- fprintf(stderr, "Usage: usbreset device-filename\n");
+ fprintf(stderr, "Usage: %s [device-filename]\n", argv[0]);
+ fprintf(stderr, "\n");
+ fprintf(stderr, "Example: sudo %s /dev/bus/usb/[BUS]/[DEVICE]", argv[0]);
+ fprintf(stderr, "Use lsusb to find the bus and device.");
return 1;
}
filename = argv[1];