diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-03-08 13:57:35 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-03-08 13:57:35 +0100 |
commit | 845fff4dad1159d3d5b94efaf8e547af8d280a5e (patch) | |
tree | 3b962216b7167d7be723e0b2dfbcea0e4312db53 /src/kernel/fs/iso9660.c | |
parent | 93af9a589980403f9887936963a6ce4f189dc020 (diff) | |
download | kogata-845fff4dad1159d3d5b94efaf8e547af8d280a5e.tar.gz kogata-845fff4dad1159d3d5b94efaf8e547af8d280a5e.zip |
Change prototypes for read, write, readdir, close ; implement blocking IPC.
Diffstat (limited to 'src/kernel/fs/iso9660.c')
-rw-r--r-- | src/kernel/fs/iso9660.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/kernel/fs/iso9660.c b/src/kernel/fs/iso9660.c index 192f8ae..89bfdf8 100644 --- a/src/kernel/fs/iso9660.c +++ b/src/kernel/fs/iso9660.c @@ -8,14 +8,14 @@ static void iso9660_fs_shutdown(fs_ptr f); static bool iso9660_node_stat(fs_node_ptr n, stat_t *st); static void iso9660_node_dispose(fs_node_ptr n); -static void iso9660_node_close(fs_node_ptr f); +static void iso9660_node_close(fs_handle_t *h); static bool iso9660_dir_open(fs_node_ptr n, int mode); static bool iso9660_dir_walk(fs_node_ptr n, const char* file, struct fs_node *node_d); -static bool iso9660_dir_readdir(fs_node_ptr f, size_t ent_no, dirent_t *d); +static bool iso9660_dir_readdir(fs_handle_t *h, size_t ent_no, dirent_t *d); static bool iso9660_file_open(fs_node_ptr n, int mode); -static size_t iso9660_file_read(fs_node_ptr f, size_t offset, size_t len, char* buf); +static size_t iso9660_file_read(fs_handle_t *h, size_t offset, size_t len, char* buf); static fs_driver_ops_t iso9660_driver_ops = { .make = iso9660_make, @@ -156,7 +156,7 @@ void iso9660_node_dispose(fs_node_ptr n) { free(node); } -void iso9660_node_close(fs_node_ptr f) { +void iso9660_node_close(fs_handle_t *h) { // nothing to do } @@ -220,8 +220,8 @@ bool iso9660_file_open(fs_node_ptr n, int mode) { return true; } -size_t iso9660_file_read(fs_node_ptr f, size_t offset, size_t len, char* buf) { - iso9660_node_t *node = (iso9660_node_t*)f; +size_t iso9660_file_read(fs_handle_t *h, size_t offset, size_t len, char* buf) { + iso9660_node_t *node = (iso9660_node_t*)h->data; if (offset >= node->dr.size.lsb) return 0; if (offset + len > node->dr.size.lsb) len = node->dr.size.lsb - offset; @@ -262,10 +262,10 @@ void iso9660_file_close(fs_node_ptr f) { // nothing to do } -bool iso9660_dir_readdir(fs_node_ptr n, size_t ent_no, dirent_t *d) { - // Very nonefficient !! +bool iso9660_dir_readdir(fs_handle_t *h, size_t ent_no, dirent_t *d) { + // TODO : Very nonefficient !! - iso9660_node_t *node = (iso9660_node_t*)n; + iso9660_node_t *node = (iso9660_node_t*)h->data; char buffer[2048]; size_t dr_len = 0; |