summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2020-06-12 20:17:08 +0000
committerPascal Terjan <pterjan@mageia.org>2020-06-12 21:39:54 +0000
commit7186c327bfaa9b87b28c6d4315169baa61b3496a (patch)
treed4e50ec32a0b4b4f93fe8c73c1bf69d3dd66d669 /mdk-stage1
parent09bd148a08effa0b000fef8a8cebb4155328f86b (diff)
downloaddrakx-7186c327bfaa9b87b28c6d4315169baa61b3496a.tar
drakx-7186c327bfaa9b87b28c6d4315169baa61b3496a.tar.gz
drakx-7186c327bfaa9b87b28c6d4315169baa61b3496a.tar.bz2
drakx-7186c327bfaa9b87b28c6d4315169baa61b3496a.tar.xz
drakx-7186c327bfaa9b87b28c6d4315169baa61b3496a.zip
Fix reading capability
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);