Bug#891773: Related bug #871229 (but it didn't break my system))
John Paul Adrian Glaubitz
glaubitz at physik.fu-berlin.de
Thu Mar 1 15:34:51 UTC 2018
On 03/01/2018 04:06 PM, John Paul Adrian Glaubitz wrote:
> Let me test a patch.
The problem is that of_path is empty here and the strcat tries
to append "disk" to an empty buffer which fails.
This fixes it for me:
diff --git a/grub-core/osdep/linux/ofpath.c b/grub-core/osdep/linux/ofpath.c
index 1c30e7233..da0000f0f 100644
--- a/grub-core/osdep/linux/ofpath.c
+++ b/grub-core/osdep/linux/ofpath.c
@@ -389,8 +389,13 @@ of_path_of_nvme(const char *sys_devname __attribute__((unused)),
}
of_path = find_obppath (sysfs_path);
+
+ if(of_path)
+ strcat (of_path, disk);
+ else
+ of_path = strdup(disk);
+
free (sysfs_path);
- strcat (of_path, disk);
return of_path;
}
root at trlin:..glaubitz/grub> ./grub-probe --device /dev/nvme0n1 --target=hints_string
--hint-ieee1275='ieee1275//disk at 1'
root at trlin:..glaubitz/grub>
I'll send a patch upstream.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz at debian.org
`. `' Freie Universitaet Berlin - glaubitz at physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
More information about the Pkg-grub-devel
mailing list