summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2022-01-05 15:18:00 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2022-01-05 15:34:30 +0100
commit46b382278db2b65819f92bd998268d5ad362f8ff (patch)
tree5ce25b820f3e474876ec3783e675d5d69b07f803
parentb97b61ccfeea051c5a952a788c91c34db6594268 (diff)
downloaddrakx-46b382278db2b65819f92bd998268d5ad362f8ff.tar
drakx-46b382278db2b65819f92bd998268d5ad362f8ff.tar.gz
drakx-46b382278db2b65819f92bd998268d5ad362f8ff.tar.bz2
drakx-46b382278db2b65819f92bd998268d5ad362f8ff.tar.xz
drakx-46b382278db2b65819f92bd998268d5ad362f8ff.zip
Fix disk method after kernel ABI breakage
commit 353c8adc2ecd4e3fdfe2941d51d8f8f620f073ff made use of kernel's GENHD_FL_UP capability. However this was removed from the kernel in 5.15: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=50b4aecfbbb09869db967e4a26212a47e10c0088 For now make this check a no op as I didn't found any alternative but nvme users may want to doble test!
-rw-r--r--mdk-stage1/NEWS2
-rw-r--r--mdk-stage1/probing.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/mdk-stage1/NEWS b/mdk-stage1/NEWS
index 6978ce828..829848638 100644
--- a/mdk-stage1/NEWS
+++ b/mdk-stage1/NEWS
@@ -1,3 +1,5 @@
+- fix 'disk' method after kernel-5.15 breakage
+
2.57
- http server: allow to specify a port different than default "80" (mga#28367)
diff --git a/mdk-stage1/probing.c b/mdk-stage1/probing.c
index 1add7fd64..f956bb348 100644
--- a/mdk-stage1/probing.c
+++ b/mdk-stage1/probing.c
@@ -670,8 +670,8 @@ void find_media(enum media_bus bus)
read_attribute(path, buf);
long caps = strtol(buf, NULL, 16);
- // GENHD_FL_UP (0x0010): indicates that the block device is “up”, with a similar meaning to network interface
- if (caps && !(caps & 0x0010)) {
+ // GENHD_FL_UP (0x0010): indicated that the block device is “up” but the kernel has removed that info
+ if (caps && 0) {
log_message("Ignoring device %s (not up)", name);
free(name);
continue;