summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2013-04-24 23:29:24 +0200
committerPeter Wu <lekensteyn@gmail.com>2013-04-24 23:29:24 +0200
commitfc791074d943364a406f845732d551431071439f (patch)
treefd797807b5b628dde818e21e60527a0811b55f4c
parent11373ec5b25a88a3a9d2d16b82f53cf05c2e70d6 (diff)
downloadltunify-fc791074d943364a406f845732d551431071439f.tar.gz
ltunify: print device type that got unpaired
-rw-r--r--ltunify.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ltunify.c b/ltunify.c
index b574435..8dcbf94 100644
--- a/ltunify.c
+++ b/ltunify.c
@@ -650,13 +650,15 @@ void perform_pair(int fd, u8 timeout) {
}
void perform_unpair(int fd, u8 device_index) {
struct device *dev = &devices[device_index - 1];
+ u8 dev_device_type = dev->device_type; // will be overwritten, therefore store it
if (!dev->device_present) {
printf("Device %#04x does not appear to be paired\n", device_index);
return;
}
if (device_unpair(fd, device_index)) {
if (!dev->device_present) {
- printf("Device %#04x succesfully unpaired\n", device_index);
+ printf("Device %#04x %s successfully unpaired\n", device_index,
+ device_type_str(dev_device_type));
} else {
fprintf(stderr, "Unpairing of %#04x possibly failed\n", device_index);
}