From f495cc1e93710c233292a503720ec235a61b685c Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 18 Mar 2020 17:32:50 +0100 Subject: Applied official linux kernel code style guidelines Due to my change to vim and the clang-format plugin this was needed! --- src/kernel/fs/vfs.c | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) (limited to 'src/kernel/fs/vfs.c') diff --git a/src/kernel/fs/vfs.c b/src/kernel/fs/vfs.c index 702851e..9aeadf0 100644 --- a/src/kernel/fs/vfs.c +++ b/src/kernel/fs/vfs.c @@ -4,46 +4,44 @@ fs_node_t *fs_root = 0; uint32_t read_fs(fs_node_t *node, uint32_t offset, uint32_t size, uint8_t *buffer) { - if (node->read != 0) - return node->read(node, offset, size, buffer); - else - return 0; + if (node->read != 0) + return node->read(node, offset, size, buffer); + else + return 0; } uint32_t write_fs(fs_node_t *node, uint32_t offset, uint32_t size, uint8_t *buffer) { - if (node->write != 0) - return node->write(node, offset, size, buffer); - else - return 0; + if (node->write != 0) + return node->write(node, offset, size, buffer); + else + return 0; } void open_fs(fs_node_t *node, uint8_t read, uint8_t write) { - if (node->open != 0) - return node->open(node); + if (node->open != 0) + return node->open(node); } void close_fs(fs_node_t *node) { - if (node->close != 0) - return node->close(node); + if (node->close != 0) + return node->close(node); } struct dirent *readdir_fs(fs_node_t *node, uint32_t index) { - if ((node->flags & 0x7) == FS_DIRECTORY && - node->readdir != 0) - return node->readdir(node, index); - else - return 0; + if ((node->flags & 0x7) == FS_DIRECTORY && node->readdir != 0) + return node->readdir(node, index); + else + return 0; } fs_node_t *finddir_fs(fs_node_t *node, char *name) { - if ((node->flags & 0x7) == FS_DIRECTORY && - node->finddir != 0) - return node->finddir(node, name); - else - return 0; + if ((node->flags & 0x7) == FS_DIRECTORY && node->finddir != 0) + return node->finddir(node, name); + else + return 0; } -- cgit v1.2.3