You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
ssten
changed the title
efibootmgr-0.21 fails to create boot entry when device min number > 127
efivar-0.21 fails to create boot entry when device min number > 127
Aug 27, 2015
No need to reproduce I guess, just see into linux.c:62:
set_disk_and_part_name(struct disk_info *info)
…
rc = sysfs_readlink(&linkbuf, "/sys/dev/block/%"PRIu64":%hhd",
info->major, info->minor);
%hhd prints unsigned info->minor as signed, which causes wrong device path if info->minor is greater than 127:
lsblk | grep sdj
sdj 8:144 1 29.8G 0 disk
├─sdj1 8:145 1 1G 0 part /boot
└─sdj2 8:146 1 28.8G 0 part /
strace efibootmgr -c -d /dev/sdj -p 1 -L … -l … -u … :
open("/dev/sdj", O_RDONLY) = 3
fstat(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 144), ...}) = 0
readlink("/sys/dev/block/8:-112", 0x7ffd5a0f9080, 4096) = -1 ENOENT
simple patch:
--- src/linux.c.old 2015-08-24 16:34:13.606782416 +0600
+++ src/linux.c 2015-08-24 16:34:21.366845626 +0600
@@ -59,7 +59,7 @@
char *linkbuf;
ssize_t rc;
- rc = sysfs_readlink(&linkbuf, "/sys/dev/block/%"PRIu64":%hhd",
The text was updated successfully, but these errors were encountered: