static char outbuf[692224];
static int debug=0, audio=0, use_mmap=1, nbufs=4;
static float freq_mhz=193.25;
-static char *devname="/dev/video0";
+static char *devicename="/dev/video0";
static char *filename=NULL;
static enum {
NORMAL,
debug++;
break;
case 'd':
- devname=arg;
+ devicename=arg;
break;
case 'i':
case 'o':
memset (drv,0,sizeof(*drv));
- if (v4l2_open (devname, 1,drv)<0) {
+ if (v4l2_open (devicename, 1,drv)<0) {
perror ("Error opening dev");
return -1;
}
/* Static vars to store the parameters */
static char *devclass = "rc0";
-static char *devname = NULL;
+static char *devicename = NULL;
static int readtable = 0;
static int clear = 0;
static int debug = 0;
period = atoi(arg);
break;
case 'd':
- devname = arg;
+ devicename = arg;
break;
case 's':
devclass = arg;
/* Just list all devices */
if (!clear && !readtable && !keys.next && !ch_proto && !cfg.next && !test && !delay && !period) {
- if (devname) {
- fd = open(devname, O_RDONLY);
+ if (devicename) {
+ fd = open(devicename, O_RDONLY);
if (fd < 0) {
perror("Can't open device");
return -1;
return 0;
}
- if (cfg.next && (clear || keys.next || ch_proto || devname)) {
+ if (cfg.next && (clear || keys.next || ch_proto || devicename)) {
fprintf (stderr, "Auto-mode can be used only with --read, --debug and --sysdev options\n");
return -1;
}
- if (!devname) {
+ if (!devicename) {
names = find_device(devclass);
if (!names)
return -1;
names->name = NULL;
free_names(names);
- devname = rc_dev.input_name;
+ devicename = rc_dev.input_name;
dev_from_class++;
}
}
if (debug)
- fprintf(stderr, "Opening %s\n", devname);
- fd = open(devname, O_RDONLY);
+ fprintf(stderr, "Opening %s\n", devicename);
+ fd = open(devicename, O_RDONLY);
if (fd < 0) {
- perror(devname);
+ perror(devicename);
return -1;
}
if (dev_from_class)
- free(devname);
+ free(devicename);
if (get_input_protocol_version(fd))
return -1;