aboutsummaryrefslogtreecommitdiffstats
path: root/debian/patches/03_budget_ci_loadkeys.dpatch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/03_budget_ci_loadkeys.dpatch')
-rw-r--r--debian/patches/03_budget_ci_loadkeys.dpatch143
1 files changed, 0 insertions, 143 deletions
diff --git a/debian/patches/03_budget_ci_loadkeys.dpatch b/debian/patches/03_budget_ci_loadkeys.dpatch
deleted file mode 100644
index 5a72efb..0000000
--- a/debian/patches/03_budget_ci_loadkeys.dpatch
+++ /dev/null
@@ -1,143 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 03_budget_ci_loadkeys.dpatch by Thomas Schmidt <thomas.schmidt@in.stud.tu-ilmenau.de>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: adds the utility budget_ci_loadkeys
-
-@DPATCH@
-diff -urNad linuxtv-dvb-apps/util/av7110_loadkeys/av7110_loadkeys.c /tmp/dpep.HGK2iu/linuxtv-dvb-apps/util/av7110_loadkeys/av7110_loadkeys.c
---- linuxtv-dvb-apps/util/av7110_loadkeys/av7110_loadkeys.c 2004-05-14 12:32:12.000000000 +0200
-+++ /tmp/dpep.HGK2iu/linuxtv-dvb-apps/util/av7110_loadkeys/av7110_loadkeys.c 2004-10-16 09:59:28.000000000 +0200
-@@ -1,5 +1,6 @@
- #include <asm/types.h>
- #include <stdlib.h>
-+#include <stdio.h>
- #include <unistd.h>
- #include <sys/mman.h>
- #include <sys/types.h>
-@@ -99,12 +100,20 @@
-
-
-
-+#ifdef HW_MSP430
-+const char usage [] = "\n\tusage: budget_ci_loadkeys keymap_filename.rc5\n\n";
-+#else
- const char usage [] = "\n\tusage: av7110_loadkeys [-i|--invert] [-a|--address <num>] keymap_filename.(rc5|rcmm)\n\n";
--
-+#endif
-
- struct ir_setup {
-+#ifdef HW_MSP430
-+#define KEYTAB_SIZE 64
-+#else
-+#define KEYTAB_SIZE 256
- __u32 ir_config;
-- __u16 keytab [256];
-+#endif
-+ __u16 keytab [KEYTAB_SIZE];
- } __attribute__ ((packed));
-
-
-@@ -116,7 +125,10 @@
- char *buf, *pos, *fname = NULL;
-
- for (i=1; i<argc; i++) {
-+#ifndef HW_MSP430
-+ /* AV7110 only; not MSP430 */
- if (!strcmp("-i", argv[i]) || !strcmp("--invert", argv[i]))
-+
- setup.ir_config |= 0x8000;
- else if (!strcmp("-a", argv[i]) || !strcmp("--address", argv[i])) {
- if (++i < argc) {
-@@ -124,6 +136,7 @@
- setup.ir_config |= 0x4000;
- }
- } else
-+#endif
- fname = argv[i];
- }
-
-@@ -132,6 +145,14 @@
- exit (-1);
- }
-
-+#ifdef HW_MSP430
-+ if (strncmp(".rc5", fname + strlen(fname) - 4, 4) != 0) {
-+ const char msg [] = "\nERROR: "
-+ "input filename must have suffix .rc5\n";
-+ write (0, msg, strlen(msg));
-+ exit (-1);
-+ }
-+#else
- if (strncmp(".rcmm", fname + strlen(fname) - 5, 5) == 0)
- setup.ir_config |= 0x0001;
- else if (strncmp(".rc5", fname + strlen(fname) - 4, 4) != 0) {
-@@ -140,6 +161,7 @@
- write (0, msg, strlen(msg));
- exit (-1);
- }
-+#endif
-
- if ((fd = open (fname, O_RDONLY)) < 0)
- print_error ("open", fname);
-@@ -161,9 +183,11 @@
- key = strtol (pos, &pos, 0);
- keycode = parse_keyname (pos, &pos, buf + len - pos);
-
-- if (key < 0 || key > 0xff) {
-- const char msg [] =
-- "\nERROR: key must be in range 0 ... 0xff!\n\n";
-+ if (key < 0 || key >= KEYTAB_SIZE) {
-+ char *msg;
-+ asprintf (&msg,
-+ "\nERROR: key must be in range 0 ... 0x%02x!\n\n",
-+ KEYTAB_SIZE);
-
- write (0, msg, strlen(msg));
- exit (-1);
-@@ -178,7 +202,7 @@
- munmap (buf, len);
- close (fd);
-
-- write (1, &setup, 4 + 256 * sizeof(__u16));
-+ write (1, &setup, sizeof (setup));
-
- return 0;
- }
-diff -urNad linuxtv-dvb-apps/util/av7110_loadkeys/Makefile /tmp/dpep.HGK2iu/linuxtv-dvb-apps/util/av7110_loadkeys/Makefile
---- linuxtv-dvb-apps/util/av7110_loadkeys/Makefile 2004-05-14 12:32:12.000000000 +0200
-+++ /tmp/dpep.HGK2iu/linuxtv-dvb-apps/util/av7110_loadkeys/Makefile 2004-10-16 09:59:27.000000000 +0200
-@@ -1,14 +1,23 @@
- CC = gcc
--CFLAGS = -g -Wall -O2
-+CFLAGS = -g -Wall -O2 -D_GNU_SOURCE
-
--all: av7110_loadkeys evtest
-+all: av7110_loadkeys budget_ci_loadkeys evtest
-
- av7110_loadkeys: av7110_loadkeys.o
-
-+budget_ci_loadkeys: budget_ci_loadkeys.o
-+
- evtest: evtest.o
-
-+av7110_loadkeys.o: CFLAGS += -UHW_MSP430
- av7110_loadkeys.o: av7110_loadkeys.c input_keynames.h
-
-+budget_ci_loadkeys.c: av7110_loadkeys.c
-+ ln av7110_loadkeys.c budget_ci_loadkeys.c
-+
-+budget_ci_loadkeys.o: CFLAGS += -DHW_MSP430
-+budget_ci_loadkeys.o: budget_ci_loadkeys.c input_keynames.h
-+
- evtest.o: evtest.c input_keynames.h
-
-
-@@ -44,5 +53,6 @@
-
-
- clean:
-- $(RM) core* *.o input_keynames.h av7110_loadkeys evtest
-+ $(RM) core* *.o input_keynames.h av7110_loadkeys budget_ci_loadkeys \
-+ budget_ci_loadkeys.c evtest
-