summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan DE CESCO <jonathanc@ti.com>2010-12-03 12:14:16 +0100
committerJonathan DE CESCO <jonathanc@ti.com>2010-12-03 12:14:16 +0100
commit18217ac85b38bce143e96f62b610fac1bb5d63dd (patch)
treeca4b9cbf67da2b1d4f23a28e608e825ef0430a16
parent32065c7eaac2f6b61fc13933dd8df6d713e6c082 (diff)
downloaduim-18217ac85b38bce143e96f62b610fac1bb5d63dd.tar.gz
fix btsdio conflict when 2 hci interfaces are registered
-rw-r--r--uim.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/uim.c b/uim.c
index 16c070e..cad5884 100644
--- a/uim.c
+++ b/uim.c
@@ -552,7 +552,7 @@ int change_rfkill_perms(void)
char path[64];
char buf[16];
for (id = 0; id < 50; id++) {
- snprintf(path, sizeof(path), "/sys/class/rfkill/rfkill%d/type", id);
+ snprintf(path, sizeof(path), "/sys/class/rfkill/rfkill%d/name", id);
fd = open(path, O_RDONLY);
if (fd < 0) {
UIM_DBG("open(%s) failed: %s (%d)\n", path, strerror(errno), errno);
@@ -560,7 +560,7 @@ int change_rfkill_perms(void)
}
sz = read(fd, &buf, sizeof(buf));
close(fd);
- if (sz >= 9 && memcmp(buf, "bluetooth", 9) == 0) {
+ if (sz >= 9 && memcmp(buf, "Bluetooth", 9) == 0) {
UIM_DBG("found bluetooth rfkill entry @ %d\n", id);
rfkill_idx = id;
break;