feat: small cleanup
This commit is contained in:
@@ -51,7 +51,7 @@ void block_dev_scan() {
|
||||
int c_last_block_dev = last_block_dev;
|
||||
for (int i = 0; i < c_last_block_dev; ++i) {
|
||||
if (block_devices[i].flags.scanned || !block_devices[i].flags.present) continue;
|
||||
u8 *lba0 = malloc(block_devices[i].block_size*4);
|
||||
u8 *lba0 = malloc(block_devices[i].block_size);
|
||||
u8 read_result = block_devices[i].access(&block_devices[i], BLOCK_DEV_DIRECTION_READ, 0, 1, lba0);
|
||||
if (read_result != BLOCK_DEV_ACCESS_OK) {
|
||||
block_devices[i].flags.unreadable = 1;
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#define BOOTLOADER_NAME_MAX_LENGTH 64
|
||||
#define CMDLINE_MAX_LENGTH 256
|
||||
|
||||
const char *msg_booted = "Booted Successfully!\n";
|
||||
const int version_major = 0,
|
||||
version_minor = 0,
|
||||
version_patch = 1;
|
||||
@@ -170,11 +169,7 @@ void kmain(multiboot_info_t *multiboot_info) {
|
||||
init_pci_system();
|
||||
init_block_devices();
|
||||
|
||||
printf("%s v%d.%d.%d\n", msg_booted, version_major, version_minor, version_patch);
|
||||
// print_gdt();
|
||||
|
||||
// u8* tmp = malloc(4096);
|
||||
// ide_access(0, 0, 0, 16, tmp);
|
||||
printf("Booted successfully v%d.%d.%d\n", version_major, version_minor, version_patch);
|
||||
|
||||
// enter main loop
|
||||
while (true) {
|
||||
|
||||
Reference in New Issue
Block a user