mirror of
https://abf.rosa.ru/djam/bluez.git
synced 2025-02-22 22:52:55 +00:00
test patches from ubuntu
This commit is contained in:
parent
4e28347b1b
commit
a2eb81e9b3
3 changed files with 74 additions and 1 deletions
55
03-Fix-return-code-of-hid2hci.patch
Normal file
55
03-Fix-return-code-of-hid2hci.patch
Normal file
|
@ -0,0 +1,55 @@
|
|||
diff -Nur bluez-4.93.orig/tools/hid2hci.c bluez-4.93/tools/hid2hci.c
|
||||
--- bluez-4.93.orig/tools/hid2hci.c 2011-05-03 12:20:36.000000000 +0400
|
||||
+++ bluez-4.93/tools/hid2hci.c 2012-08-06 16:23:21.211963738 +0400
|
||||
@@ -240,7 +240,7 @@
|
||||
enum mode mode = HCI;
|
||||
const char *devpath = NULL;
|
||||
int err = -1;
|
||||
- int rc = 1;
|
||||
+ int rc = 0;
|
||||
|
||||
for (;;) {
|
||||
int option;
|
||||
@@ -288,13 +288,16 @@
|
||||
}
|
||||
|
||||
udev = udev_new();
|
||||
- if (udev == NULL)
|
||||
- goto exit;
|
||||
+ if (udev == NULL) {
|
||||
+ rc = errno;
|
||||
+ goto exit;
|
||||
+ }
|
||||
|
||||
snprintf(syspath, sizeof(syspath), "%s/%s", udev_get_sys_path(udev), devpath);
|
||||
udev_dev = udev_device_new_from_syspath(udev, syspath);
|
||||
if (udev_dev == NULL) {
|
||||
fprintf(stderr, "error: could not find '%s'\n", devpath);
|
||||
+ rc = errno;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
@@ -312,6 +315,7 @@
|
||||
dev = udev_device_get_parent_with_subsystem_devtype(dev, "usb", "usb_device");
|
||||
if (dev == NULL) {
|
||||
fprintf(stderr, "error: could not find usb_device for '%s'\n", devpath);
|
||||
+ rc = errno;
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
@@ -320,6 +324,7 @@
|
||||
if (handle == NULL) {
|
||||
fprintf(stderr, "error: unable to handle '%s'\n",
|
||||
udev_device_get_syspath(dev));
|
||||
+ rc = errno;
|
||||
goto exit;
|
||||
}
|
||||
err = usb_switch(handle, mode);
|
||||
@@ -331,6 +336,7 @@
|
||||
device = udev_device_get_devnode(udev_dev);
|
||||
if (device == NULL) {
|
||||
fprintf(stderr, "error: could not find hiddev device node\n");
|
||||
+ rc = errno;
|
||||
goto exit;
|
||||
}
|
||||
err = hid_switch_logitech(device);
|
14
04-Fix-disabled-after-resume.patch
Normal file
14
04-Fix-disabled-after-resume.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
diff -Nur bluez-4.93.orig/plugins/hciops.c bluez-4.93/plugins/hciops.c
|
||||
--- bluez-4.93.orig/plugins/hciops.c 2011-05-03 12:20:36.000000000 +0400
|
||||
+++ bluez-4.93/plugins/hciops.c 2012-08-06 16:14:37.216366594 +0400
|
||||
@@ -2571,8 +2571,8 @@
|
||||
hci_send_cmd(dev->sk, OGF_HOST_CTL, OCF_READ_STORED_LINK_KEY,
|
||||
READ_STORED_LINK_KEY_CP_SIZE, &cp);
|
||||
|
||||
- if (!dev->pending)
|
||||
- init_adapter(index);
|
||||
+ DBG("dev->pending=%d", dev->pending);
|
||||
+ init_adapter(index);
|
||||
}
|
||||
|
||||
static void init_pending(int index)
|
|
@ -7,7 +7,7 @@
|
|||
Name: bluez
|
||||
Summary: Official Linux Bluetooth protocol stack
|
||||
Version: 4.93
|
||||
Release: %mkrel 2
|
||||
Release: %mkrel 3
|
||||
License: GPLv2+
|
||||
Group: Communications
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||
|
@ -29,6 +29,8 @@ Source9: rfcomm.conf
|
|||
Patch100: bluez-4.79-fail_udev_event_on_error.patch
|
||||
# (bor) based on http://article.gmane.org/gmane.linux.bluez.kernel/6479
|
||||
Patch101: bluez-4.93-systemd_support.patch
|
||||
Patch102: 03-Fix-return-code-of-hid2hci.patch
|
||||
Patch103: 04-Fix-disabled-after-resume.patch
|
||||
|
||||
BuildRequires: dbus-devel
|
||||
BuildRequires: flex
|
||||
|
@ -208,6 +210,8 @@ applications which will use libraries from %{name}.
|
|||
%setup -q -n %name-%{version}
|
||||
%patch100 -p1 -b .fail_event
|
||||
%patch101 -p1 -b .systemd
|
||||
%patch102 -p1
|
||||
%patch103 -p1
|
||||
|
||||
|
||||
%build
|
||||
|
|
Loading…
Add table
Reference in a new issue