summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTormod Volden <debian.tormod@gmail.com>2011-08-23 19:33:46 +0200
committerTormod Volden <debian.tormod@gmail.com>2011-10-03 23:31:31 +0200
commit250bdba87421792076a944777bf4161a4d17e1f6 (patch)
treec08332e8fd60aeae09b40181768c6354a7397cb5
parent3fb37e4abdc8184a86d818e0eafe59520fc77d61 (diff)
Add --help option to show usage description
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
-rw-r--r--radeontool.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/radeontool.c b/radeontool.c
index f9710fc..08b1749 100644
--- a/radeontool.c
+++ b/radeontool.c
@@ -155,6 +155,7 @@ static void usage(void)
& RADEON_LVDS_ON) ? "on" : "off";
}
fprintf(stderr,"usage: radeontool [options] [command]\n");
+ fprintf(stderr," --help - show this usage text\n");
fprintf(stderr," --debug - show a little debug info\n");
fprintf(stderr," --skip=1 - use the second radeon card\n");
fprintf(stderr," dac [on|off] - power down the external "
@@ -2976,6 +2977,8 @@ int main(int argc,char *argv[])
} else if (strncmp(argv[1],"--skip=", 7) == 0) {
skip=atoi(argv[1]+7);
argv++; argc--;
+ } else if(strcmp(argv[1], "--help") == 0) {
+ usage();
} else {
break;
}