Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9be03a7841 | ||
|
|
1525a75133 | ||
|
|
e34c9fcf1c | ||
|
|
c9a200ca8e |
No files matched your search
Vendored
+32
@@ -1,3 +1,35 @@
|
|||||||
|
g15daemon (1.9.5.3-8.1) unstable; urgency=low
|
||||||
|
|
||||||
|
* Non-maintainer upload.
|
||||||
|
* Send a sync event after key up/down (closes: #567213).
|
||||||
|
|
||||||
|
-- Julien Cristau <jcristau@debian.org> Sun, 25 Jul 2010 11:39:22 +0200
|
||||||
|
|
||||||
|
g15daemon (1.9.5.3-8) unstable; urgency=low
|
||||||
|
|
||||||
|
* Put the third argument (modes) on open with O_CREAT (Closes: #559649)
|
||||||
|
* remove rpath
|
||||||
|
|
||||||
|
-- Giacomo Catenazzi <cate@debian.org> Fri, 18 Dec 2009 07:52:26 +0100
|
||||||
|
|
||||||
|
g15daemon (1.9.5.3-7) unstable; urgency=low
|
||||||
|
|
||||||
|
* Change priority of libg15daemon-client1 from extra to optional
|
||||||
|
(mumble package needs it)
|
||||||
|
|
||||||
|
-- Giacomo Catenazzi <cate@debian.org> Tue, 01 Sep 2009 19:50:38 +0200
|
||||||
|
|
||||||
|
g15daemon (1.9.5.3-6) unstable; urgency=low
|
||||||
|
|
||||||
|
* Shared devices (lcd dispaly + audio) are not good handled
|
||||||
|
by udev script. Adding workaround until improving
|
||||||
|
programs to handle disconnections (Closes: #541780)
|
||||||
|
* Add debugging flag (and code) for init.d and udev scripts
|
||||||
|
* Change syslog facility: from user to daemon
|
||||||
|
* better (and more secure) screenshort creation in /tmp
|
||||||
|
|
||||||
|
-- Giacomo Catenazzi <cate@debian.org> Wed, 19 Aug 2009 07:33:22 +0200
|
||||||
|
|
||||||
g15daemon (1.9.5.3-5) unstable; urgency=low
|
g15daemon (1.9.5.3-5) unstable; urgency=low
|
||||||
|
|
||||||
* Handle keyboard device with udev, so detecting detachement
|
* Handle keyboard device with udev, so detecting detachement
|
||||||
|
|||||||
Vendored
+2
-1
@@ -2,7 +2,7 @@ Source: g15daemon
|
|||||||
Section: utils
|
Section: utils
|
||||||
Priority: extra
|
Priority: extra
|
||||||
Maintainer: Giacomo Catenazzi <cate@debian.org>
|
Maintainer: Giacomo Catenazzi <cate@debian.org>
|
||||||
Build-Depends: cdbs, debhelper (>= 5), autotools-dev, automake1.9, libtool,
|
Build-Depends: cdbs, debhelper (>= 5), autotools-dev, automake1.9, libtool, chrpath,
|
||||||
libg15-dev, libg15render-dev (>=1.2.0.svn250-2), libusb-dev, libfreetype6-dev
|
libg15-dev, libg15render-dev (>=1.2.0.svn250-2), libusb-dev, libfreetype6-dev
|
||||||
Standards-Version: 3.8.2
|
Standards-Version: 3.8.2
|
||||||
Homepage: http://www.g15tools.com/
|
Homepage: http://www.g15tools.com/
|
||||||
@@ -21,6 +21,7 @@ Description: Screen multiplexer for Logitech G15 Keyboard
|
|||||||
|
|
||||||
Package: libg15daemon-client1
|
Package: libg15daemon-client1
|
||||||
Section: libs
|
Section: libs
|
||||||
|
Priority: optional
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||||
Description: Development packages for libg15daemon-client
|
Description: Development packages for libg15daemon-client
|
||||||
|
|||||||
Vendored
+3
@@ -8,5 +8,8 @@
|
|||||||
|
|
||||||
SWITCH_KEY="L1"
|
SWITCH_KEY="L1"
|
||||||
|
|
||||||
|
# Turn on debugging of g15 init.d and udev scripts
|
||||||
|
#G15DEBUG="on"
|
||||||
|
|
||||||
# Additional options that are passed to the Daemon.
|
# Additional options that are passed to the Daemon.
|
||||||
DAEMON_OPTS=""
|
DAEMON_OPTS=""
|
||||||
Vendored
+37
-4
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
# Provides: g15daemon
|
# Provides: g15daemon
|
||||||
# Required-Start: $local_fs
|
# Required-Start: $syslog $local_fs
|
||||||
# Required-Stop: $local_fs
|
# Required-Stop: $syslog $local_fs
|
||||||
# Should-Start: $remote_fs
|
# Should-Start: $remote_fs
|
||||||
# Should-Stop: $remote_fs
|
# Should-Stop: $remote_fs
|
||||||
# X-Start-Before: xdm kdm gdm ldm sdm
|
# X-Start-Before: xdm kdm gdm ldm sdm
|
||||||
@@ -32,6 +32,21 @@ fi
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ "$G15DEBUG" = "on" ]; then
|
||||||
|
|
||||||
|
log() {
|
||||||
|
logger -p daemon.debug -t g15 -- "$*"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
|
||||||
|
log() {
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wait_for_file() {
|
wait_for_file() {
|
||||||
local file=$1
|
local file=$1
|
||||||
@@ -114,17 +129,18 @@ case "$1" in
|
|||||||
echo -n "Restarting $DESC: "
|
echo -n "Restarting $DESC: "
|
||||||
do_stop
|
do_stop
|
||||||
# the device is slow to shut-down
|
# the device is slow to shut-down
|
||||||
sleep 0.5
|
sleep 1
|
||||||
do_start
|
do_start
|
||||||
echo "$NAME."
|
echo "$NAME."
|
||||||
;;
|
;;
|
||||||
udev)
|
udev)
|
||||||
|
log "calling g15 udev; action: $ACTION, product $PRODUCT"
|
||||||
if [ "x$ACTION" = "xadd" ] ; then
|
if [ "x$ACTION" = "xadd" ] ; then
|
||||||
load_uinput || true
|
load_uinput || true
|
||||||
wait_usr_mount || true
|
wait_usr_mount || true
|
||||||
# it seems udev will not release a device if userspace is still
|
# it seems udev will not release a device if userspace is still
|
||||||
# connected
|
# connected
|
||||||
is_running && ( do_stop; sleep 0.5 )
|
is_running && ( do_stop; sleep 1 )
|
||||||
do_start
|
do_start
|
||||||
elif [ "x$ACTION" = "xremove" ] ; then
|
elif [ "x$ACTION" = "xremove" ] ; then
|
||||||
do_stop
|
do_stop
|
||||||
@@ -134,6 +150,23 @@ case "$1" in
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
shared-udev)
|
||||||
|
# some devices share usb also for audio, which causes some spourios
|
||||||
|
# udev messages.
|
||||||
|
log "calling g15 shared-dev; action: $ACTION, product $PRODUCT"
|
||||||
|
if [ "x$ACTION" = "xadd" ] ; then
|
||||||
|
load_uinput || true
|
||||||
|
wait_usr_mount || true
|
||||||
|
do_start
|
||||||
|
elif [ "x$ACTION" = "xremove" ] ; then
|
||||||
|
do_stop
|
||||||
|
else
|
||||||
|
echo "unknow udev action '$ACTION'"
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
N=/etc/init.d/$NAME
|
N=/etc/init.d/$NAME
|
||||||
echo "Usage: $N {start|stop|restart|force-reload|udev}" >&2
|
echo "Usage: $N {start|stop|restart|force-reload|udev}" >&2
|
||||||
|
|||||||
Vendored
+2
-3
@@ -10,12 +10,11 @@ SYSFS{idVendor}=="046d", SYSFS{idProduct}=="c225", RUN+="/etc/init.d/g15daemon u
|
|||||||
SYSFS{idVendor}=="046d", SYSFS{idProduct}=="c222", RUN+="/etc/init.d/g15daemon udev"
|
SYSFS{idVendor}=="046d", SYSFS{idProduct}=="c222", RUN+="/etc/init.d/g15daemon udev"
|
||||||
|
|
||||||
# Logitech G15 v2 (orange) -- extra keys and LCD
|
# Logitech G15 v2 (orange) -- extra keys and LCD
|
||||||
SYSFS{idVendor}=="046d", SYSFS{idProduct}=="c227", RUN+="/etc/init.d/g15daemon udev"
|
SYSFS{idVendor}=="046d", SYSFS{idProduct}=="c227", RUN+="/etc/init.d/g15daemon shared-udev"
|
||||||
|
|
||||||
# Logitech Z10 -- extra keys and LCD
|
# Logitech Z10 -- extra keys and LCD
|
||||||
SYSFS{idVendor}=="046d", SYSFS{idProduct}=="0a07", RUN+="/etc/init.d/g15daemon udev"
|
SYSFS{idVendor}=="046d", SYSFS{idProduct}=="0a07", RUN+="/etc/init.d/g15daemon udev"
|
||||||
|
|
||||||
# Logitech G15 Gamepanel -- extra keys and LCD
|
# Logitech G15 Gamepanel -- extra keys and LCD
|
||||||
SYSFS{idVendor}=="046d", SYSFS{idProduct}=="c251", RUN+="/etc/init.d/g15daemon udev"
|
SYSFS{idVendor}=="046d", SYSFS{idProduct}=="c251", RUN+="/etc/init.d/g15daemon shared-udev"
|
||||||
|
|
||||||
|
|
||||||
Vendored
+6
-2
@@ -7,7 +7,8 @@ AUTOMAKE_REMOVE += g15daemon/g15daemon g15daemon/g15daemontest
|
|||||||
AUTOMAKE_REMOVE += config.status config.log config.h config.h.in config/* libtool stamp-h1
|
AUTOMAKE_REMOVE += config.status config.log config.h config.h.in config/* libtool stamp-h1
|
||||||
AUTOMAKE_REMOVE += */.libs/
|
AUTOMAKE_REMOVE += */.libs/
|
||||||
|
|
||||||
#clean::
|
clean::
|
||||||
|
-rm -Rf debian/docs libg15daemon-client.install
|
||||||
# -rm -Rf $(AUTOMAKE_REMOVE)
|
# -rm -Rf $(AUTOMAKE_REMOVE)
|
||||||
|
|
||||||
#makebuilddir:: Makefile
|
#makebuilddir:: Makefile
|
||||||
@@ -24,5 +25,8 @@ AUTOMAKE_REMOVE += */.libs/
|
|||||||
include /usr/share/cdbs/1/rules/debhelper.mk
|
include /usr/share/cdbs/1/rules/debhelper.mk
|
||||||
include /usr/share/cdbs/1/class/autotools.mk
|
include /usr/share/cdbs/1/class/autotools.mk
|
||||||
|
|
||||||
DEB_CONFIGURE_EXTRA_FLAGS = --quiet
|
DEB_CONFIGURE_EXTRA_FLAGS = --quiet --disable-rpath
|
||||||
|
|
||||||
|
install/libg15daemon-client1::
|
||||||
|
chrpath --delete $(DEB_DESTDIR)/usr/lib/libg15daemon_client.so.1.0.2 $(DEB_DESTDIR)/usr/lib/g15daemon/1.9.5.3/plugins/*.so $(DEB_DESTDIR)/usr/sbin/g15daemon
|
||||||
|
|
||||||
+1
-1
@@ -456,7 +456,7 @@ int main (int argc, char *argv[])
|
|||||||
struct passwd *nobody;
|
struct passwd *nobody;
|
||||||
unsigned char location[1024];
|
unsigned char location[1024];
|
||||||
|
|
||||||
openlog("g15daemon", LOG_PID, LOG_USER);
|
openlog("g15daemon", LOG_PID, LOG_DAEMON);
|
||||||
if(strlen((char*)user)==0){
|
if(strlen((char*)user)==0){
|
||||||
nobody = getpwnam("nobody");
|
nobody = getpwnam("nobody");
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ int uf_conf_write(g15daemon_t *list,char *filename)
|
|||||||
config_items_t * item=NULL;
|
config_items_t * item=NULL;
|
||||||
char line[1024];
|
char line[1024];
|
||||||
|
|
||||||
config_fd = open(filename,O_CREAT|O_RDWR|O_TRUNC);
|
config_fd = open(filename,O_CREAT|O_RDWR|O_TRUNC, 0644);
|
||||||
if(config_fd){
|
if(config_fd){
|
||||||
snprintf(line,1024,"# G15Daemon Configuration File\n# any items entered before a [section] header\n# will be in the Global config space\n# comments you wish to keep should start with a semicolon';'\n");
|
snprintf(line,1024,"# G15Daemon Configuration File\n# any items entered before a [section] header\n# will be in the Global config space\n# comments you wish to keep should start with a semicolon';'\n");
|
||||||
write(config_fd,line,strlen(line));
|
write(config_fd,line,strlen(line));
|
||||||
@@ -666,12 +666,24 @@ int uf_conf_open(g15daemon_t *list, char *filename) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int uf_screendump_pbm(unsigned char *buffer,char *filename) {
|
int uf_screendump_pbm(unsigned char *buffer,char *filename) {
|
||||||
|
int fd;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
int x,y;
|
int x,y;
|
||||||
#define WIDTH 40
|
#define WIDTH 40
|
||||||
g15canvas *canvas=g15daemon_xmalloc(sizeof(g15canvas));
|
g15canvas *canvas=g15daemon_xmalloc(sizeof(g15canvas));
|
||||||
memcpy(canvas->buffer,buffer,LCD_BUFSIZE);
|
memcpy(canvas->buffer,buffer,LCD_BUFSIZE);
|
||||||
f = fopen(filename,"w+");
|
fd = open(filename, O_CREAT|O_EXCL|O_WRONLY, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
|
||||||
|
if(fd == -1) {
|
||||||
|
g15daemon_log(LOG_WARNING, "uf_screendump_pbm failed: open, %s.\n", strerror(errno));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
f = fdopen(fd,"w");
|
||||||
|
if(f==NULL) {
|
||||||
|
close(fd);
|
||||||
|
g15daemon_log(LOG_WARNING, "uf_screendump_pbm failed: fdopen, %s.\n", strerror(errno));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
fprintf(f,"P1\n160 43\n");
|
fprintf(f,"P1\n160 43\n");
|
||||||
fprintf(f,"# G15 screendump - %s\n\n",filename);
|
fprintf(f,"# G15 screendump - %s\n\n",filename);
|
||||||
for(y=0;y<43;y++)
|
for(y=0;y<43;y++)
|
||||||
@@ -681,7 +693,9 @@ int uf_screendump_pbm(unsigned char *buffer,char *filename) {
|
|||||||
fprintf(f,"\n");
|
fprintf(f,"\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
fsync(fd);
|
||||||
|
close(fd);
|
||||||
free(canvas);
|
free(canvas);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,6 +125,13 @@ static void g15_uinput_keydown(unsigned char code)
|
|||||||
event.value = G15KEY_DOWN;
|
event.value = G15KEY_DOWN;
|
||||||
|
|
||||||
write (uinp_fd, &event, sizeof(event));
|
write (uinp_fd, &event, sizeof(event));
|
||||||
|
|
||||||
|
memset(&event, 0, sizeof(event));
|
||||||
|
|
||||||
|
event.type = EV_SYN;
|
||||||
|
event.code = SYN_REPORT;
|
||||||
|
|
||||||
|
write (uinp_fd, &event, sizeof(event));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void g15_uinput_keyup(unsigned char code)
|
static void g15_uinput_keyup(unsigned char code)
|
||||||
@@ -137,6 +144,13 @@ static void g15_uinput_keyup(unsigned char code)
|
|||||||
event.value = G15KEY_UP;
|
event.value = G15KEY_UP;
|
||||||
|
|
||||||
write (uinp_fd, &event, sizeof(event));
|
write (uinp_fd, &event, sizeof(event));
|
||||||
|
|
||||||
|
memset(&event, 0, sizeof(event));
|
||||||
|
|
||||||
|
event.type = EV_SYN;
|
||||||
|
event.code = SYN_REPORT;
|
||||||
|
|
||||||
|
write (uinp_fd, &event, sizeof(event));
|
||||||
}
|
}
|
||||||
|
|
||||||
void (*keyup)(unsigned char code) = &g15_uinput_keyup;
|
void (*keyup)(unsigned char code) = &g15_uinput_keyup;
|
||||||
|
|||||||
Reference in new issue
Block a user