summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/probing.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mdk-stage1/probing.c b/mdk-stage1/probing.c
index bce905686..db99fb56f 100644
--- a/mdk-stage1/probing.c
+++ b/mdk-stage1/probing.c
@@ -666,10 +666,9 @@ void find_media(enum media_bus bus)
strcpy(pathend, "/device/model");
read_attribute(path, model+vendor_length);
- strcpy(pathend, "/device/capability");
- strcpy(buf, "0x0");
- read_attribute(path, buf+3);
- int caps = atoi(buf);
+ strcpy(pathend, "/capability");
+ read_attribute(path, buf);
+ long caps = strtol(buf, NULL, 16);
if (!(caps & 0x0010)) {
log_message("Ignoring device %s (not up)", name);