Start moving uLogitech files into libratbag proper

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2015-08-20 11:19:03 +10:00
parent 93ca4e24d4
commit f36f4d22a7
6 changed files with 10 additions and 7 deletions

View File

@@ -4,14 +4,19 @@ include_HEADERS = \
libratbag.h
libratbag_la_SOURCES = \
debug.h \
etekcity.c \
hidpp10.c \
hidpp10.h \
libratbag.c \
libratbag.h \
libratbag-hidraw.c \
libratbag-hidraw.h \
libratbag-util.c \
libratbag-private.h \
libratbag-util.h
libratbag-util.h \
unifying.h \
unifying.c
libratbag_la_LIBADD = $(LIBUDEV_LIBS)

View File

@@ -29,6 +29,8 @@
* https://drive.google.com/folderview?id=0BxbRzx7vEV7eWmgwazJ3NUFfQ28&usp=sharing
*/
#include "config.h"
#include <linux/types.h>
#include <errno.h>
#include <stdio.h>
@@ -38,11 +40,7 @@
#include <debug.h>
#include <hidpp10.h>
#define MIN(a,b) \
({ __typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
_a < _b ? _a : _b; \
})
#include <libratbag-util.h>
#if DEBUG_LVL > 0
const char *hidpp_errors[0xFF] = {
@@ -250,7 +248,7 @@ static int hidpp10_get_device_info(int fd, struct unifying_device *dev) {
name_size = device_name.msg.string[1];
memcpy(dev->name, &device_name.msg.string[2], sizeof(device_name.msg.string));
dev->name[MIN(name_size, sizeof(dev->name) - 1)] = '\0';
dev->name[min(name_size, sizeof(dev->name) - 1)] = '\0';
/*
* This may fail on some devices