utils/dvb: The current FE userspace is just a test tool. Rename it
authorMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 9 Nov 2011 18:18:32 +0000 (16:18 -0200)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 7 Jan 2012 13:12:11 +0000 (11:12 -0200)
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
utils/dvb/Makefile
utils/dvb/dvb-fe-tool.c [new file with mode: 0644]
utils/dvb/dvbv5_scan.c [deleted file]

index 698fbedd56669a70e895f705da9fa8ff846cb8c0..d813e2422acbf3ac2f32b4339aa4ced335ae91fd 100644 (file)
@@ -1,10 +1,10 @@
-TARGETS = dvbv5_scan
+TARGETS = dvb-fe-tool
 
 all: $(TARGETS)
 
 -include *.d
 
-dvbv5_scan: dvbv5_scan.o dvb-fe.o
+dvb-fe-tool: dvb-fe-tool.o dvb-fe.o
        $(CC) $(LDFLAGS) -o $@ $^
 
 dvb-v5.h:
diff --git a/utils/dvb/dvb-fe-tool.c b/utils/dvb/dvb-fe-tool.c
new file mode 100644 (file)
index 0000000..f87a0f8
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2011 - Mauro Carvalho Chehab <mchehab@redhat.com>
+ */
+
+#include "dvb-fe.h"
+#include <argp.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+const char *argp_program_version = "DVBv5 scan version "V4L_UTILS_VERSION;
+const char *argp_program_bug_address = "Mauro Carvalho Chehab <mchehab@redhat.com>";
+
+static const char doc[] = "\nAllows scanning DVB using API version 5\n"
+       "\nOn the options bellow, the arguments are:\n"
+       "  ADAPTER      - the dvb adapter to control\n"
+       "  FRONTEND     - the dvb frontend to control";
+
+static const struct argp_option options[] = {
+       {"verbose",     'v',    0,              0,      "enables debug messages", 0},
+       {"adapter",     'a',    "ADAPTER",      0,      "dvb adapter", 0},
+       {"frontend",    'f',    "FRONTEND",     0,      "dvb frontend", 0},
+       { 0, 0, 0, 0, 0, 0 }
+};
+
+static int adapter = 0;
+static int frontend = 0;
+static int verbose = 1;                /* FIXME */
+
+static error_t parse_opt(int k, char *arg, struct argp_state *state)
+{
+       switch (k) {
+       case 'a':
+               adapter = atoi(arg);
+               break;
+       case 'f':
+               frontend = atoi(arg);
+               break;
+       case 'v':
+               verbose ++;
+               break;
+       default:
+               return ARGP_ERR_UNKNOWN;
+       }
+       return 0;
+}
+
+static struct argp argp = {
+       .options = options,
+       .parser = parse_opt,
+       .doc = doc,
+};
+
+int main(int argc, char *argv[])
+{
+       struct dvb_v5_fe_parms *parms;
+
+       argp_parse(&argp, argc, argv, 0, 0, 0);
+
+       parms = dvb_fe_open(adapter, frontend, verbose);
+       dvb_fe_close(parms);
+
+       return 0;
+}
diff --git a/utils/dvb/dvbv5_scan.c b/utils/dvb/dvbv5_scan.c
deleted file mode 100644 (file)
index f87a0f8..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2011 - Mauro Carvalho Chehab <mchehab@redhat.com>
- */
-
-#include "dvb-fe.h"
-#include <argp.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-const char *argp_program_version = "DVBv5 scan version "V4L_UTILS_VERSION;
-const char *argp_program_bug_address = "Mauro Carvalho Chehab <mchehab@redhat.com>";
-
-static const char doc[] = "\nAllows scanning DVB using API version 5\n"
-       "\nOn the options bellow, the arguments are:\n"
-       "  ADAPTER      - the dvb adapter to control\n"
-       "  FRONTEND     - the dvb frontend to control";
-
-static const struct argp_option options[] = {
-       {"verbose",     'v',    0,              0,      "enables debug messages", 0},
-       {"adapter",     'a',    "ADAPTER",      0,      "dvb adapter", 0},
-       {"frontend",    'f',    "FRONTEND",     0,      "dvb frontend", 0},
-       { 0, 0, 0, 0, 0, 0 }
-};
-
-static int adapter = 0;
-static int frontend = 0;
-static int verbose = 1;                /* FIXME */
-
-static error_t parse_opt(int k, char *arg, struct argp_state *state)
-{
-       switch (k) {
-       case 'a':
-               adapter = atoi(arg);
-               break;
-       case 'f':
-               frontend = atoi(arg);
-               break;
-       case 'v':
-               verbose ++;
-               break;
-       default:
-               return ARGP_ERR_UNKNOWN;
-       }
-       return 0;
-}
-
-static struct argp argp = {
-       .options = options,
-       .parser = parse_opt,
-       .doc = doc,
-};
-
-int main(int argc, char *argv[])
-{
-       struct dvb_v5_fe_parms *parms;
-
-       argp_parse(&argp, argc, argv, 0, 0, 0);
-
-       parms = dvb_fe_open(adapter, frontend, verbose);
-       dvb_fe_close(parms);
-
-       return 0;
-}