diff options
author | Jonathan DE CESCO <jonathanc@ti.com> | 2010-12-03 12:14:16 +0100 |
---|---|---|
committer | Jonathan DE CESCO <jonathanc@ti.com> | 2010-12-03 12:14:16 +0100 |
commit | 18217ac85b38bce143e96f62b610fac1bb5d63dd (patch) | |
tree | ca4b9cbf67da2b1d4f23a28e608e825ef0430a16 | |
parent | 32065c7eaac2f6b61fc13933dd8df6d713e6c082 (diff) | |
download | uim-18217ac85b38bce143e96f62b610fac1bb5d63dd.tar.gz |
fix btsdio conflict when 2 hci interfaces are registered
-rw-r--r-- | uim.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |