devfs: translate partition offsets in B_TRIM_DEVICE
Fixes bfs part of #10336. Untested on SATA (don't have a testing drive to sacrifice) but working fine on SD/MMC. This requires moving the copy from kernel to userland into the devfs. As a result the code in the disk drivers becomes a bit simpler. Also add some documentation for the common ioctls to implement for a disk device. Change-Id: Ie84b6a1d293828d33902a64b3c9d4b19aa6eacb1 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3640 Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
a43b8d4634
commit
cef80a1fb7
@@ -175,8 +175,8 @@ typedef struct {
|
||||
uint32 range_count;
|
||||
uint64 trimmed_size; /* filled on return */
|
||||
struct range {
|
||||
uint64 offset; /* offset (in bytes) */
|
||||
uint64 size;
|
||||
off_t offset; /* offset (in bytes) */
|
||||
off_t size;
|
||||
} ranges[1];
|
||||
} fs_trim_data;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user