|
ginnOS
The reference: libc, the libraries and the kernel
|
Macros | |
| #define | EXT2_SUPERBLOCK_MAGIC 0xEF53u |
Functions | |
| bool | partition_initialize (partition_device_t *part, block_device_t *parent, uint32_t start_lba) |
| initialize a partition wrapper device around a parent block device. | |
| bool | partition_detect_ext2 (partition_device_t *part, block_device_t *parent) |
| detect an EXT2 partition on parent block device and initialize partition wrapper. | |
| bool | partition_is_ginnos_root (block_device_t *device) |
| check that an ext2 filesystem on a block device has the ginnOS root label. | |
| bool | partition_find_ginnos_root (partition_device_t *part, block_device_t *parent) |
| find the partition with the ginnOS root label on a disk: the primary MBR partitions, or the GPT partitions if the MBR is a protective one (type 0xEE). | |
| #define EXT2_SUPERBLOCK_MAGIC 0xEF53u |
| bool partition_initialize | ( | partition_device_t * | part, |
| block_device_t * | parent, | ||
| uint32_t | start_lba ) |
initialize a partition wrapper device around a parent block device.
| part | partition device object to initialize. |
| parent | parent block device backend. |
| start_lba | starting LBA sector of partition. |
| bool partition_detect_ext2 | ( | partition_device_t * | part, |
| block_device_t * | parent ) |
detect an EXT2 partition on parent block device and initialize partition wrapper.
checks MBR partition table and candidate LBAs (63, 2048, 0).
| part | partition device object to initialize. |
| parent | parent block device backend. |
| bool partition_is_ginnos_root | ( | block_device_t * | device | ) |
check that an ext2 filesystem on a block device has the ginnOS root label.
the kernel uses this to not mount a disk of another operating system on real hardware.
| device | the block device (a partition) with the filesystem. |
| bool partition_find_ginnos_root | ( | partition_device_t * | part, |
| block_device_t * | parent ) |
find the partition with the ginnOS root label on a disk: the primary MBR partitions, or the GPT partitions if the MBR is a protective one (type 0xEE).
a disk without a partition table is checked as a whole.
| part | the partition device to set up. |
| parent | the disk. |