HomeFreeBSD

kboot: Implement write support for hostdisk

Description

kboot: Implement write support for hostdisk

Don't assume that strategy is only called for read. Check the passed
flag for F_READ or F_WRITE and fail if it is neither. Open the disks for
writing and call host_read/host_write depending on that flag.

Sponsored by: Netflix
Reviewed by: kevans, gallatin
Differential Revision: https://reviews.freebsd.org/D44016

(cherry picked from commit b3e76e3d9e2262c4b79e81e63e09bfe62c1f6baa)

Details

Provenance
impAuthored on Feb 22 2024, 3:17 PM
Reviewer
kevans
Differential Revision
D44016: kboot: Implement write support for hostdisk
Parents
rG92f8c2f636e0: loader/efi: Make gcc friendlier by move md_dev
Branches
Unknown
Tags
Unknown