]> git.ipfire.org Git - thirdparty/grub.git/commit
luks2: grub_cryptodisk_t->total_sectors is the max number of device native sectors
authorGlenn Washburn <development@efficientek.com>
Tue, 8 Dec 2020 22:45:43 +0000 (16:45 -0600)
committerDaniel Kiper <daniel.kiper@oracle.com>
Sat, 12 Dec 2020 00:19:04 +0000 (01:19 +0100)
commit7ed69b1d1c7a0fff237d1cb425ccf33dd284799d
treee72d80cc83846c3702067df65ed3193511a12027
parentb34cb38795d6bb7f8546f1a16b671a900161f68e
luks2: grub_cryptodisk_t->total_sectors is the max number of device native sectors

We need to convert the sectors from the size of the underlying device to the
cryptodisk sector size; segment.size is in bytes which need to be converted
to cryptodisk sectors as well.

Also, removed an empty statement.

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/disk/luks2.c