]> git.ipfire.org Git - thirdparty/grub.git/commit
disk: Generalize MD_MAX_DISKS to GRUB_MDRAID_MAX_DISKS
authorJulian Andres Klode <julian.klode@canonical.com>
Tue, 13 Jun 2023 12:54:48 +0000 (14:54 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 22 Jun 2023 22:50:38 +0000 (00:50 +0200)
commitb2c72f4641b1992759f630abf8c22e480933b6c5
treea41e1123ccd4e891be8e7f7a21a7e1388780fc27
parent87247635c0d583cfbc1947107d23b40877d107b8
disk: Generalize MD_MAX_DISKS to GRUB_MDRAID_MAX_DISKS

Move the constant from grub-core/osdep/linux/getroot.c to
include/grub/disk.h and then reuse it in place of the
hardcoded 1024 limit in diskfilter.

Fixes: 2a5e3c1f2 (disk/diskfilter: Don't make a RAID array with more than 1024 disks)
Cc: Daniel Axtens <dja@axtens.net>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Julian Andres Klode <julian.klode@canonical.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/disk/diskfilter.c
grub-core/osdep/linux/getroot.c
include/grub/disk.h