From ca67b09c015d4af3ae3cce12aa72e60941dbb8b5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 18:29:52 +0200 Subject: Adding debian version 2.06-13+deb12u1. Signed-off-by: Daniel Baumann --- debian/patches/probe-fusionio.patch | 76 +++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 debian/patches/probe-fusionio.patch (limited to 'debian/patches/probe-fusionio.patch') diff --git a/debian/patches/probe-fusionio.patch b/debian/patches/probe-fusionio.patch new file mode 100644 index 0000000..d0d5efa --- /dev/null +++ b/debian/patches/probe-fusionio.patch @@ -0,0 +1,76 @@ +From 611974f8c3231d87ca572feda72eb6d1a5a6b309 Mon Sep 17 00:00:00 2001 +From: Colin Watson +Date: Mon, 13 Jan 2014 12:13:31 +0000 +Subject: Probe FusionIO devices + +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1237519 +Forwarded: no +Last-Update: 2016-09-18 + +Patch-Name: probe-fusionio.patch +--- + grub-core/osdep/linux/getroot.c | 13 +++++++++++++ + util/deviceiter.c | 19 +++++++++++++++++++ + 2 files changed, 32 insertions(+) + +diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c +index 001b818fe..c506f4cb5 100644 +--- a/grub-core/osdep/linux/getroot.c ++++ b/grub-core/osdep/linux/getroot.c +@@ -963,6 +963,19 @@ grub_util_part_to_disk (const char *os_dev, struct stat *st, + *pp = '\0'; + return path; + } ++ ++ /* If this is a FusionIO disk. */ ++ if ((strncmp ("fio", p, 3) == 0) && p[3] >= 'a' && p[3] <= 'z') ++ { ++ char *pp = p + 3; ++ while (*pp >= 'a' && *pp <= 'z') ++ pp++; ++ if (*pp) ++ *is_part = 1; ++ /* /dev/fio[a-z]+[0-9]* */ ++ *pp = '\0'; ++ return path; ++ } + } + + return path; +diff --git a/util/deviceiter.c b/util/deviceiter.c +index b5b9ac6ab..3a8f2770e 100644 +--- a/util/deviceiter.c ++++ b/util/deviceiter.c +@@ -384,6 +384,12 @@ get_nvme_disk_name (char *name, int controller, int namespace) + { + sprintf (name, "/dev/nvme%dn%d", controller, namespace); + } ++ ++static void ++get_fio_disk_name (char *name, int unit) ++{ ++ sprintf (name, "/dev/fio%c", unit + 'a'); ++} + #endif + + static struct seen_device +@@ -929,6 +935,19 @@ grub_util_iterate_devices (int (*hook) (const char *, int, void *), void *hook_d + } + } + ++ /* FusionIO. */ ++ for (i = 0; i < 26; i++) ++ { ++ char name[16]; ++ ++ get_fio_disk_name (name, i); ++ if (check_device_readable_unique (name)) ++ { ++ if (hook (name, 0, hook_data)) ++ goto out; ++ } ++ } ++ + # ifdef HAVE_DEVICE_MAPPER + # define dmraid_check(cond, ...) \ + if (! (cond)) \ -- cgit v1.2.3