aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Borner2020-04-19 17:33:06 +0200
committerMarvin Borner2020-04-19 17:33:06 +0200
commit63a2e138f3f5f8d4fa731a06dc2b0e3ab4eab3bc (patch)
tree6607d5229881ce092e91550c1fa9d676ecdac393
parentdce9106bcb47ef37a4cf5a221340f4eb438aedfe (diff)
Applied tidy command...
Idk why I forgot it for several commits :D
-rw-r--r--src/bootloader/grub.cfg2
-rw-r--r--src/kernel/acpi/acpi.c2
-rw-r--r--src/kernel/acpi/acpi.h2
-rw-r--r--src/kernel/boot.asm2
-rw-r--r--src/kernel/cmos/rtc.c2
-rw-r--r--src/kernel/cmos/rtc.h2
-rw-r--r--src/kernel/fs/ata.c2
-rw-r--r--src/kernel/fs/ata.h2
-rw-r--r--src/kernel/fs/elf.c2
-rw-r--r--src/kernel/fs/ext2.c26
-rw-r--r--src/kernel/fs/ext2.h2
-rw-r--r--src/kernel/fs/load.c2
-rw-r--r--src/kernel/fs/vfs.c2
-rw-r--r--src/kernel/graphics/vesa.c2
-rw-r--r--src/kernel/interrupts/isr.c2
-rw-r--r--src/kernel/kernel.c2
-rw-r--r--src/kernel/lib/lib.h2
-rw-r--r--src/kernel/lib/memory.c2
-rw-r--r--src/kernel/lib/stdio.h2
-rw-r--r--src/kernel/lib/stdio/debug.c2
-rw-r--r--src/kernel/memory/paging.c2
-rw-r--r--src/kernel/memory/paging.h2
-rw-r--r--src/kernel/multiboot.c4
-rw-r--r--src/kernel/multiboot.h2
-rw-r--r--src/kernel/net/rtl8139.c2
-rw-r--r--src/kernel/pci/pci.c2
-rw-r--r--src/kernel/smbios/smbios.c5
-rw-r--r--src/kernel/smbios/smbios.h2
-rw-r--r--src/kernel/system.c2
-rw-r--r--src/kernel/system.h2
30 files changed, 51 insertions, 38 deletions
diff --git a/src/bootloader/grub.cfg b/src/bootloader/grub.cfg
index 57af145..75d4934 100644
--- a/src/bootloader/grub.cfg
+++ b/src/bootloader/grub.cfg
@@ -3,4 +3,4 @@ set default=0
menuentry "Melvix" {
multiboot2 /boot/kernel.bin
boot
-}
+} \ No newline at end of file
diff --git a/src/kernel/acpi/acpi.c b/src/kernel/acpi/acpi.c
index 5485042..865435f 100644
--- a/src/kernel/acpi/acpi.c
+++ b/src/kernel/acpi/acpi.c
@@ -106,4 +106,4 @@ void reboot()
outb(0x64, 0xFE);
halt_loop();
}
-}
+} \ No newline at end of file
diff --git a/src/kernel/acpi/acpi.h b/src/kernel/acpi/acpi.h
index 055af2c..0b98552 100644
--- a/src/kernel/acpi/acpi.h
+++ b/src/kernel/acpi/acpi.h
@@ -166,4 +166,4 @@ struct fadt *fadt;
struct hpet *hpet;
struct madt *madt;
-#endif
+#endif \ No newline at end of file
diff --git a/src/kernel/boot.asm b/src/kernel/boot.asm
index 5513fc7..d15bce4 100644
--- a/src/kernel/boot.asm
+++ b/src/kernel/boot.asm
@@ -82,4 +82,4 @@ section .text
section .end_section
global ASM_KERNEL_END
ASM_KERNEL_END:
- ; Kernel size detection
+ ; Kernel size detection \ No newline at end of file
diff --git a/src/kernel/cmos/rtc.c b/src/kernel/cmos/rtc.c
index a10f484..6488d34 100644
--- a/src/kernel/cmos/rtc.c
+++ b/src/kernel/cmos/rtc.c
@@ -91,4 +91,4 @@ void rtc_print()
{
read_rtc();
info("Current time: %d:%d:%d %d/%d/%d", hour, minute, second, month, day, year);
-}
+} \ No newline at end of file
diff --git a/src/kernel/cmos/rtc.h b/src/kernel/cmos/rtc.h
index 7604bb1..6c2ba81 100644
--- a/src/kernel/cmos/rtc.h
+++ b/src/kernel/cmos/rtc.h
@@ -14,4 +14,4 @@ void read_rtc();
void rtc_print();
-#endif
+#endif \ No newline at end of file
diff --git a/src/kernel/fs/ata.c b/src/kernel/fs/ata.c
index e1f749f..b637dbd 100644
--- a/src/kernel/fs/ata.c
+++ b/src/kernel/fs/ata.c
@@ -289,4 +289,4 @@ void ata_init()
ata_device_detect(&primary_slave, 1);
// ata_device_detect(&secondary_master, 0);
// ata_device_detect(&secondary_slave, 0);
-}
+} \ No newline at end of file
diff --git a/src/kernel/fs/ata.h b/src/kernel/fs/ata.h
index 4a2951f..36dec8d 100644
--- a/src/kernel/fs/ata.h
+++ b/src/kernel/fs/ata.h
@@ -116,4 +116,4 @@ void ata_device_detect(ata_dev_t *dev, int primary);
void ata_init();
-#endif
+#endif \ No newline at end of file
diff --git a/src/kernel/fs/elf.c b/src/kernel/fs/elf.c
index 493bdac..f6d7fb8 100644
--- a/src/kernel/fs/elf.c
+++ b/src/kernel/fs/elf.c
@@ -63,4 +63,4 @@ uint32_t load_elf(char *elf_data)
}
return hdr->entry;
-}
+} \ No newline at end of file
diff --git a/src/kernel/fs/ext2.c b/src/kernel/fs/ext2.c
index bc17db6..41c2a3d 100644
--- a/src/kernel/fs/ext2.c
+++ b/src/kernel/fs/ext2.c
@@ -570,7 +570,9 @@ void set_disk_block_number(ext2_fs_t *ext2fs, inode_t *inode, uint32_t inode_idx
}
b = a - p;
if (b <= 0) {
- if(!alloc_inode_metadata_block(&(inode->blocks[EXT2_DIRECT_BLOCKS]), ext2fs, inode, inode_idx, NULL, 0));
+ if (!alloc_inode_metadata_block(&(inode->blocks[EXT2_DIRECT_BLOCKS]), ext2fs, inode,
+ inode_idx, NULL, 0))
+ ;
read_disk_block(ext2fs, inode->blocks[EXT2_DIRECT_BLOCKS], (void *)tmp);
((unsigned int *)tmp)[a] = disk_block;
write_disk_block(ext2fs, inode->blocks[EXT2_DIRECT_BLOCKS], (void *)tmp);
@@ -581,9 +583,13 @@ void set_disk_block_number(ext2_fs_t *ext2fs, inode_t *inode, uint32_t inode_idx
if (c <= 0) {
c = b / p;
d = b - c * p;
- if(!alloc_inode_metadata_block(&(inode->blocks[EXT2_DIRECT_BLOCKS + 1]), ext2fs, inode, inode_idx, NULL, 0));
+ if (!alloc_inode_metadata_block(&(inode->blocks[EXT2_DIRECT_BLOCKS + 1]), ext2fs,
+ inode, inode_idx, NULL, 0))
+ ;
read_disk_block(ext2fs, inode->blocks[EXT2_DIRECT_BLOCKS + 1], (void *)tmp);
- if(!alloc_inode_metadata_block(&(tmp[c]), ext2fs, inode, inode_idx, (void*)tmp, inode->blocks[EXT2_DIRECT_BLOCKS + 1]));
+ if (!alloc_inode_metadata_block(&(tmp[c]), ext2fs, inode, inode_idx, (void *)tmp,
+ inode->blocks[EXT2_DIRECT_BLOCKS + 1]))
+ ;
unsigned int temp = tmp[c];
read_disk_block(ext2fs, temp, (void *)tmp);
tmp[d] = disk_block;
@@ -595,12 +601,18 @@ void set_disk_block_number(ext2_fs_t *ext2fs, inode_t *inode, uint32_t inode_idx
e = c / (p * p);
f = (c - e * p * p) / p;
g = (c - e * p * p - f * p);
- if(!alloc_inode_metadata_block(&(inode->blocks[EXT2_DIRECT_BLOCKS + 2]), ext2fs, inode, inode_idx, NULL, 0));
+ if (!alloc_inode_metadata_block(&(inode->blocks[EXT2_DIRECT_BLOCKS + 2]), ext2fs,
+ inode, inode_idx, NULL, 0))
+ ;
read_disk_block(ext2fs, inode->blocks[EXT2_DIRECT_BLOCKS + 2], (void *)tmp);
- if(!alloc_inode_metadata_block(&(tmp[e]), ext2fs, inode, inode_idx, (void*)tmp, inode->blocks[EXT2_DIRECT_BLOCKS + 2]));
+ if (!alloc_inode_metadata_block(&(tmp[e]), ext2fs, inode, inode_idx, (void *)tmp,
+ inode->blocks[EXT2_DIRECT_BLOCKS + 2]))
+ ;
unsigned int temp = tmp[e];
read_disk_block(ext2fs, tmp[e], (void *)tmp);
- if(!alloc_inode_metadata_block(&(tmp[f]), ext2fs, inode, inode_idx, (void*)tmp, temp));
+ if (!alloc_inode_metadata_block(&(tmp[f]), ext2fs, inode, inode_idx, (void *)tmp,
+ temp))
+ ;
temp = tmp[f];
read_disk_block(ext2fs, tmp[f], (void *)tmp);
tmp[g] = disk_block;
@@ -784,4 +796,4 @@ void ext2_init(char *device_path, char *mountpoint)
inode_t *root_inode = kcalloc(sizeof(inode_t), 1);
read_inode_metadata(ext2fs, root_inode, ROOT_INODE_NUMBER);
vfs_mount(mountpoint, get_ext2_root(ext2fs, root_inode));
-}
+} \ No newline at end of file
diff --git a/src/kernel/fs/ext2.h b/src/kernel/fs/ext2.h
index 62105c7..562d96c 100644
--- a/src/kernel/fs/ext2.h
+++ b/src/kernel/fs/ext2.h
@@ -208,4 +208,4 @@ vfs_node_t *get_ext2_root(ext2_fs_t *ext2fs, inode_t *inode);
void ext2_init(char *device_path, char *mountpoint);
-#endif
+#endif \ No newline at end of file
diff --git a/src/kernel/fs/load.c b/src/kernel/fs/load.c
index ed8e042..7f5340a 100644
--- a/src/kernel/fs/load.c
+++ b/src/kernel/fs/load.c
@@ -32,4 +32,4 @@ void load_binaries()
}
}*/
vga_log("Successfully loaded binaries");
-}
+} \ No newline at end of file
diff --git a/src/kernel/fs/vfs.c b/src/kernel/fs/vfs.c
index 4d35926..afe3780 100644
--- a/src/kernel/fs/vfs.c
+++ b/src/kernel/fs/vfs.c
@@ -366,4 +366,4 @@ void vfs_mount(char *path, vfs_node_t *fs_obj)
return;
}
vfs_mount_recur(path + 1, vfs_tree->root, fs_obj);
-}
+} \ No newline at end of file
diff --git a/src/kernel/graphics/vesa.c b/src/kernel/graphics/vesa.c
index ca190ad..926c34a 100644
--- a/src/kernel/graphics/vesa.c
+++ b/src/kernel/graphics/vesa.c
@@ -369,4 +369,4 @@ void vesa_set_color(uint32_t color)
{
vesa_convert_color(terminal_color, color);
vesa_convert_color(terminal_background, default_background_color);
-}
+} \ No newline at end of file
diff --git a/src/kernel/interrupts/isr.c b/src/kernel/interrupts/isr.c
index 2f134c1..c2d58ef 100644
--- a/src/kernel/interrupts/isr.c
+++ b/src/kernel/interrupts/isr.c
@@ -127,4 +127,4 @@ void fault_handler(struct regs *r)
panic("Unknown Exception");
}
}
-}
+} \ No newline at end of file
diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c
index a0a1fb2..944fd75 100644
--- a/src/kernel/kernel.c
+++ b/src/kernel/kernel.c
@@ -77,4 +77,4 @@ void kernel_main(uint32_t magic, uint32_t multiboot_address)
// panic("This should NOT happen!");
// asm ("div %0" :: "r"(0)); // Exception testing x/0
-}
+} \ No newline at end of file
diff --git a/src/kernel/lib/lib.h b/src/kernel/lib/lib.h
index 986e522..7ebae9a 100644
--- a/src/kernel/lib/lib.h
+++ b/src/kernel/lib/lib.h
@@ -42,4 +42,4 @@ void memory_print();
uint32_t memory_get_all();
-#endif
+#endif \ No newline at end of file
diff --git a/src/kernel/lib/memory.c b/src/kernel/lib/memory.c
index 6238535..c244052 100644
--- a/src/kernel/lib/memory.c
+++ b/src/kernel/lib/memory.c
@@ -116,4 +116,4 @@ int memory_init(uint32_t multiboot_address)
}
}
return ret;
-}
+} \ No newline at end of file
diff --git a/src/kernel/lib/stdio.h b/src/kernel/lib/stdio.h
index 6da0f37..8668775 100644
--- a/src/kernel/lib/stdio.h
+++ b/src/kernel/lib/stdio.h
@@ -17,4 +17,4 @@ void serial_vprintf(const char *fmt, va_list args);
void serial_printf(const char *fmt, ...);
-#endif
+#endif \ No newline at end of file
diff --git a/src/kernel/lib/stdio/debug.c b/src/kernel/lib/stdio/debug.c
index 68f0785..0942d49 100644
--- a/src/kernel/lib/stdio/debug.c
+++ b/src/kernel/lib/stdio/debug.c
@@ -59,4 +59,4 @@ void serial_printf(const char *fmt, ...)
va_start(args, fmt);
serial_vprintf(fmt, args);
va_end(args);
-}
+} \ No newline at end of file
diff --git a/src/kernel/memory/paging.c b/src/kernel/memory/paging.c
index 38ed4a7..99160d0 100644
--- a/src/kernel/memory/paging.c
+++ b/src/kernel/memory/paging.c
@@ -194,4 +194,4 @@ uint32_t paging_get_used_pages()
}
}
return n;
-}
+} \ No newline at end of file
diff --git a/src/kernel/memory/paging.h b/src/kernel/memory/paging.h
index 1578e2a..93563ac 100644
--- a/src/kernel/memory/paging.h
+++ b/src/kernel/memory/paging.h
@@ -61,4 +61,4 @@ uint32_t paging_alloc_pages(uint32_t count);
uint32_t paging_get_used_pages();
-#endif
+#endif \ No newline at end of file
diff --git a/src/kernel/multiboot.c b/src/kernel/multiboot.c
index fb96e10..fe59f45 100644
--- a/src/kernel/multiboot.c
+++ b/src/kernel/multiboot.c
@@ -19,7 +19,7 @@ void multiboot_parse(uint32_t multiboot_address)
break;
case MULTIBOOT_TAG_TYPE_BOOT_LOADER_NAME:
debug("Got bootloader name: %s",
- ((struct multiboot_tag_string *)tag)->string);
+ ((struct multiboot_tag_string *)tag)->string);
break;
case MULTIBOOT_TAG_TYPE_MODULE:
debug("Got modules");
@@ -69,4 +69,4 @@ void multiboot_parse(uint32_t multiboot_address)
break;
}
}
-}
+} \ No newline at end of file
diff --git a/src/kernel/multiboot.h b/src/kernel/multiboot.h
index 95bde38..b82b457 100644
--- a/src/kernel/multiboot.h
+++ b/src/kernel/multiboot.h
@@ -378,4 +378,4 @@ void multiboot_parse();
#endif
-#endif
+#endif \ No newline at end of file
diff --git a/src/kernel/net/rtl8139.c b/src/kernel/net/rtl8139.c
index 2a6a3e8..a934e52 100644
--- a/src/kernel/net/rtl8139.c
+++ b/src/kernel/net/rtl8139.c
@@ -100,4 +100,4 @@ void rtl8139_install()
if (rtl8139_init() == 0)
info("Installed rtl8139 network driver");
-}
+} \ No newline at end of file
diff --git a/src/kernel/pci/pci.c b/src/kernel/pci/pci.c
index 57bfe94..6e660b7 100644
--- a/src/kernel/pci/pci.c
+++ b/src/kernel/pci/pci.c
@@ -137,4 +137,4 @@ int pci_get_interrupt(uint32_t device)
} else {
return (int)pci_read_field(device, PCI_INTERRUPT_LINE, 1);
}
-}
+} \ No newline at end of file
diff --git a/src/kernel/smbios/smbios.c b/src/kernel/smbios/smbios.c
index 5e48ffa..b99f83b 100644
--- a/src/kernel/smbios/smbios.c
+++ b/src/kernel/smbios/smbios.c
@@ -3,7 +3,8 @@
#include <kernel/system.h>
#include <kernel/smbios/smbios.h>
-void smbios_init(struct multiboot_tag_smbios *tag) {
+void smbios_init(struct multiboot_tag_smbios *tag)
+{
log("%s", ((struct smbios_0 *)tag->tables)->vendor);
return;
-}
+} \ No newline at end of file
diff --git a/src/kernel/smbios/smbios.h b/src/kernel/smbios/smbios.h
index 1d0765a..c6ce0d5 100644
--- a/src/kernel/smbios/smbios.h
+++ b/src/kernel/smbios/smbios.h
@@ -24,4 +24,4 @@ struct smbios_1 {
void smbios_init(struct multiboot_tag_smbios *tag);
-#endif
+#endif \ No newline at end of file
diff --git a/src/kernel/system.c b/src/kernel/system.c
index 80b38e3..f2e3d55 100644
--- a/src/kernel/system.c
+++ b/src/kernel/system.c
@@ -124,4 +124,4 @@ void v86(uint8_t code, regs16_t *regs)
paging_disable();
int32(code, regs);
paging_enable();
-}
+} \ No newline at end of file
diff --git a/src/kernel/system.h b/src/kernel/system.h
index 407cd75..e5d4f0b 100644
--- a/src/kernel/system.h
+++ b/src/kernel/system.h
@@ -110,4 +110,4 @@ void v86(uint8_t code, regs16_t *regs);
#define WHT "\x1B[37m"
#define RES "\x1B[0m"
-#endif
+#endif \ No newline at end of file