]> git.ipfire.org Git - thirdparty/grub.git/commit
osdep/linux/hostdisk: Modify sector by sysfs as disk sector
authorMukesh Kumar Chaurasiya <mchauras@linux.vnet.ibm.com>
Thu, 9 Feb 2023 07:39:16 +0000 (13:09 +0530)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 14 Feb 2023 15:01:17 +0000 (16:01 +0100)
commitf7564844f82b57078d601befadc438b5bc1fa01b
tree012fdbf758e9ffa005e282f3aef3edd91f062b0d
parent53e0726285846056483cfadfbc33861fb0dc7e2a
osdep/linux/hostdisk: Modify sector by sysfs as disk sector

The disk sector size provided by sysfs file system considers the sector
size of 512 irrespective of disk sector size, thus causing the read by
the GRUB to an incorrect offset from what was originally intended.

Considering the 512 sector size of sysfs data the actual sector needs to
be modified corresponding to disk sector size.

Signed-off-by: Mukesh Kumar Chaurasiya <mchauras@linux.vnet.ibm.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/osdep/linux/hostdisk.c
include/grub/disk.h