From c1ec955152b48b7938d20e9cba8b6e67479c2e73 Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 1 Nov 2026 02:07:26 +0100 Subject: add a signature mechanism for ioctl control strings --- dos/chudisk.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'dos/chudisk.h') diff --git a/dos/chudisk.h b/dos/chudisk.h index 1d2fbe4..bc7f12d 100644 --- a/dos/chudisk.h +++ b/dos/chudisk.h @@ -54,7 +54,7 @@ extern struct chudisk_data struct chudisk_unit { /** Whether the partition exists (start_sector points to it) */ bool exists; - /** Note in theory may be zero (superfloppy) */ + /** Start sector of partition. Note in theory may be zero (superfloppy) */ uint32_t start_sector; /** Number of sectors for this partition. */ uint32_t sectors; @@ -78,15 +78,21 @@ extern uint8_t wait_for_ch375_result(unsigned int max_ticks); // TODO Not sure we can really happily add custom minors here, // but then again DOS outright refuses to accept any other major enum CHUDISK_IOCTL_DISK_MINOR { + /** Read an absolute disk sector. + * This ignores any configured partition on this unit. */ CHUDISK_IOCTL_DISK_READ_ABS_SECTOR = 0xC1 }; typedef _Packed union CHUDISK_IOCTL_DISK_DATA { + /* @see CHUDISK_IOCTL_DISK_READ_ABS_SECTOR */ struct CHUDISK_RWABSSECTOR { - uint32_t sector; - uint8_t sectors; - void far * buffer; + /** Absolute starting sector. */ + uint32_t sector; + /** Number of sectors to read. */ + uint8_t sectors; + /** Buffer to read data into. */ + void far * buffer; } rwabs; } CHUDISK_IOCTL_DISK_DATA; -- cgit v1.2.3