diff options
author | Pascal Terjan <pterjan@mageia.org> | 2020-06-12 20:17:08 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2020-06-12 21:39:54 +0000 |
commit | 7186c327bfaa9b87b28c6d4315169baa61b3496a (patch) | |
tree | d4e50ec32a0b4b4f93fe8c73c1bf69d3dd66d669 /mdk-stage1 | |
parent | 09bd148a08effa0b000fef8a8cebb4155328f86b (diff) | |
download | drakx-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.c | 7 |
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); |