summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTormod Volden <debian.tormod@gmail.com>2011-11-19 16:19:52 +0100
committerTormod Volden <debian.tormod@gmail.com>2011-11-19 16:19:52 +0100
commit9f88745ed1f3dde5440d412468c5aaa09e353bbe (patch)
tree39c5c92e90d9cf85ab60eb6526958031ad4a3552
parenta9ae553c0f5eeb60bfb4e1dde67f8b08e3b16e7b (diff)
Add -V option to print versions3switch-0.1
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
-rw-r--r--s3switch.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/s3switch.c b/s3switch.c
index 5462fe3..3b295f5 100644
--- a/s3switch.c
+++ b/s3switch.c
@@ -17,6 +17,8 @@
#include "lrmi.h"
+#define S3SWITCH_VERSION_STRING "0.1"
+
// Usage:
// s3switch [-q] [crt|lcd|both]
@@ -439,6 +441,11 @@ main( int argc, char ** argv )
newtv = TV_FORMAT_NTSC;
else if( strcasecmp( *argv, "pal" ) == 0 )
newtv = TV_FORMAT_PAL;
+ else if( strcmp( *argv, "-V" ) == 0 )
+ {
+ printf("s3switch " S3SWITCH_VERSION_STRING "\n");
+ exit( 0 );
+ }
else if( strcmp( *argv, "-h" ) == 0 )
{
usage();