Commit 98c93c43 authored by Andy Gatward's avatar Andy Gatward Committed by Christophe Massiot

Include version info in dvblast and dvblastctl console output. Suggestion and...

Include version info in dvblast and dvblastctl console output. Suggestion and initial patch (reworked) by Adrien Grand.
parent 6e80a051
......@@ -11,7 +11,7 @@ OBJ_DVBLASTCTL = util.o dvblastctl.o
all: dvblast dvblastctl
$(OBJ_DVBLAST) $(OBJ_DVBLASTCTL): Makefile dvblast.h en50221.h comm.h
$(OBJ_DVBLAST) $(OBJ_DVBLASTCTL): Makefile dvblast.h en50221.h comm.h version.h
dvblast: $(OBJ_DVBLAST)
$(CC) -o $@ $(OBJ_DVBLAST) $(LDFLAGS_DVBLAST)
......
......@@ -34,6 +34,7 @@
#include <signal.h>
#include "dvblast.h"
#include "version.h"
/*****************************************************************************
* Local declarations
......@@ -196,6 +197,15 @@ static void SigHandler( int i_signal )
b_hup_received = 1;
}
/*****************************************************************************
* Version
*****************************************************************************/
static void DisplayVersion()
{
msg_Raw( NULL, "DVBlast %d.%d.%d%s", VERSION_MAJOR, VERSION_MINOR,
VERSION_REVISION, VERSION_EXTRA );
}
/*****************************************************************************
* Entry point
*****************************************************************************/
......@@ -224,10 +234,12 @@ int main( int i_argc, char **pp_argv )
int i_error;
int c;
DisplayVersion();
if ( i_argc == 1 )
usage();
msg_Warn( NULL, "restarting" );
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:eh")) != -1 )
{
......
......@@ -37,11 +37,14 @@
#include "dvblast.h"
#include "en50221.h"
#include "comm.h"
#include "version.h"
int i_verbose = 3;
void usage()
{
msg_Raw( NULL, "DVBlastctl %d.%d.%d%s", VERSION_MAJOR, VERSION_MINOR,
VERSION_REVISION, VERSION_EXTRA );
msg_Raw( NULL, "Usage: dvblastctl -r <remote socket> reload|shutdown|fe_status|mmi_status|mmi_open|mmi_close|mmi_get|mmi_send_text|mmi_send_choice [<CAM slot>] [<text/choice>]" );
exit(1);
}
......
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