Commit 6fd252cd authored by massiot's avatar massiot

* dvblast.c: Add -V for printing the version only; bail out if unknown args are passed.


git-svn-id: svn://svn.videolan.org/dvblast/trunk@80 55d3f8b6-4a41-4d2d-a900-313d1436a5b8
parent 80d51c11
...@@ -211,7 +211,7 @@ static void DisplayVersion() ...@@ -211,7 +211,7 @@ static void DisplayVersion()
*****************************************************************************/ *****************************************************************************/
void usage() void usage()
{ {
msg_Raw( NULL, "Usage: dvblast [-q] -c <config file> [-r <remote socket>] [-t <ttl>] [-o <SSRC IP>] [-i <RT priority>] [-a <adapter>] [-n <frontend number>] [-S <diseqc>] -f <frequency> [-s <symbol rate>] [-v <0|13|18>] [-p] [-b <bandwidth>] [-m <modulation] [-u] [-W] [-U] [-d <dest IP:port>] [-e] [-T]" ); msg_Raw( NULL, "Usage: dvblast [-q] [-c <config file>] [-r <remote socket>] [-t <ttl>] [-o <SSRC IP>] [-i <RT priority>] [-a <adapter>] [-n <frontend number>] [-S <diseqc>] -f <frequency> [-s <symbol rate>] [-v <0|13|18>] [-p] [-b <bandwidth>] [-m <modulation] [-u] [-W] [-U] [-d <dest IP:port>] [-e] [-T]" );
msg_Raw( NULL, " -q: be quiet (less verbosity, repeat or use number for even quieter)" ); msg_Raw( NULL, " -q: be quiet (less verbosity, repeat or use number for even quieter)" );
msg_Raw( NULL, " -v: voltage to apply to the LNB (QPSK)" ); msg_Raw( NULL, " -v: voltage to apply to the LNB (QPSK)" );
msg_Raw( NULL, " -p: force 22kHz pulses for high-band selection (DVB-S)" ); msg_Raw( NULL, " -p: force 22kHz pulses for high-band selection (DVB-S)" );
...@@ -225,6 +225,8 @@ void usage() ...@@ -225,6 +225,8 @@ void usage()
msg_Raw( NULL, " -d: duplicate all received packets to a given destination" ); msg_Raw( NULL, " -d: duplicate all received packets to a given destination" );
msg_Raw( NULL, " -e: enable EPG pass through (EIT data)" ); msg_Raw( NULL, " -e: enable EPG pass through (EIT data)" );
msg_Raw( NULL, " -T: generate unique TS ID for each program" ); msg_Raw( NULL, " -T: generate unique TS ID for each program" );
msg_Raw( NULL, " -h: display this full help" );
msg_Raw( NULL, " -V: only display the version" );
exit(1); exit(1);
} }
...@@ -239,9 +241,7 @@ int main( int i_argc, char **pp_argv ) ...@@ -239,9 +241,7 @@ int main( int i_argc, char **pp_argv )
if ( i_argc == 1 ) if ( i_argc == 1 )
usage(); usage();
msg_Warn(NULL, "restarting"); while ( ( c = getopt(i_argc, pp_argv, "q::c:r:t:o:i:a:n:f:s:S:v:pb:m:uWUTd:ehV")) != -1 )
while ( ( c = getopt(i_argc, pp_argv, "q::c:r:t:o:i:a:n:f:s:S:v:pb:m:uWUTd:eh")) != -1 )
{ {
switch ( c ) switch ( c )
{ {
...@@ -365,11 +365,19 @@ int main( int i_argc, char **pp_argv ) ...@@ -365,11 +365,19 @@ int main( int i_argc, char **pp_argv )
b_unique_tsid = 1; b_unique_tsid = 1;
break; break;
case 'V':
exit(0);
break;
case 'h': case 'h':
default: default:
usage(); usage();
} }
} }
if ( optind < i_argc )
usage();
msg_Warn( NULL, "restarting" );
if ( b_output_udp ) if ( b_output_udp )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment