aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/fs
diff options
context:
space:
mode:
authorMarvin Borner2020-04-19 17:33:06 +0200
committerMarvin Borner2020-04-19 17:33:06 +0200
commit63a2e138f3f5f8d4fa731a06dc2b0e3ab4eab3bc (patch)
tree6607d5229881ce092e91550c1fa9d676ecdac393 /src/kernel/fs
parentdce9106bcb47ef37a4cf5a221340f4eb438aedfe (diff)
Applied tidy command...
Idk why I forgot it for several commits :D
Diffstat (limited to 'src/kernel/fs')
-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
7 files changed, 25 insertions, 13 deletions
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