fat_io_lib finally works, implement virtual partition devices, manage devices via string keys
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m35s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m35s
This commit is contained in:
27
kernel/device/partitions.h
Normal file
27
kernel/device/partitions.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef _KERNEL_DEVICE_PARTITIONS_H
|
||||
#define _KERNEL_DEVICE_PARTITIONS_H
|
||||
|
||||
#include <aux/compiler.h>
|
||||
#include <device/device.h>
|
||||
#include <libk/std.h>
|
||||
|
||||
struct dos_pte {
|
||||
uint8_t drive_attrs;
|
||||
uint8_t chs_start_addr[3];
|
||||
uint8_t part_type;
|
||||
uint8_t chs_last_sect_addr[3];
|
||||
uint32_t start_lba;
|
||||
uint32_t sector_count;
|
||||
} PACKED;
|
||||
|
||||
struct dos_mbr {
|
||||
uint8_t boot_code[440];
|
||||
uint8_t signature[4];
|
||||
uint8_t resv[2];
|
||||
struct dos_pte ptes[4];
|
||||
uint8_t valid_sign[2];
|
||||
} PACKED;
|
||||
|
||||
int device_probe_partitions (struct device* device);
|
||||
|
||||
#endif // _KERNEL_DEVICE_PARTITIONS_H
|
||||
Reference in New Issue
Block a user