|
miniOS
x86_64 hobby kernel with SMP, VFS, and POSIX process model
|
#include <miniOS/types.h>

Go to the source code of this file.
Classes | |
| struct | block_device_t |
Macros | |
| #define | BLKDEV_MAX 16 |
| #define | BLKDEV_MAJOR_SATA 8 /* SCSI/ATA disk major, matching Linux convention */ |
Functions | |
| void | blkdev_init (void) |
: Short device name ("sda", "sda1", ...). Must be < 16 chars. | |
blkdev_register() - Add a block device to the registry. @major: Device major number. @minor: Device minor number. @lba_start: First LBA of the device's data region. @lba_end: Last LBA inclusive (both 0 if not a partition). @is_partition: True if this entry represents a partition.
| |
| int | blkdev_register (const char *name, uint8_t major, uint8_t minor, uint64_t lba_start, uint64_t lba_end, bool is_partition) |
| const block_device_t * | blkdev_find (uint8_t major, uint8_t minor) |
| const block_device_t * | blkdev_get (int index) |
| int | blkdev_count (void) |
| #define BLKDEV_MAJOR_SATA 8 /* SCSI/ATA disk major, matching Linux convention */ |
| #define BLKDEV_MAX 16 |
| int blkdev_count | ( | void | ) |
blkdev_count() - Return the number of registered block devices.
| const block_device_t * blkdev_find | ( | uint8_t | major, |
| uint8_t | minor ) |
blkdev_find() - Look up a block device by major and minor number. @major: Device major number. @minor: Device minor number.

| const block_device_t * blkdev_get | ( | int | index | ) |
blkdev_get() - Get a block device by index. @index: Zero-based index into the registry.
| void blkdev_init | ( | void | ) |
blkdev_init() - Clear the block device registry. Called once during kernel startup before any blkdev_register() calls.

