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/dev | |
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/dev')
-rw-r--r-- | src/kernel/dev/pciide.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/kernel/dev/pciide.c b/src/kernel/dev/pciide.c index c357190..56d4e4f 100644 --- a/src/kernel/dev/pciide.c +++ b/src/kernel/dev/pciide.c @@ -659,10 +659,10 @@ typedef struct { static bool ide_vfs_open(fs_node_ptr n, int mode); static bool ide_vfs_stat(fs_node_ptr n, stat_t *st); -static size_t ide_vfs_read(fs_node_ptr f, size_t offset, size_t len, char* buf); -static size_t ide_vfs_write(fs_node_ptr f, size_t offset, size_t len, const char* buf); +static size_t ide_vfs_read(fs_handle_t *f, size_t offset, size_t len, char* buf); +static size_t ide_vfs_write(fs_handle_t *f, size_t offset, size_t len, const char* buf); static int ide_vfs_ioctl(fs_node_ptr f, int command, void* data); -static void ide_vfs_close(fs_node_ptr f); +static void ide_vfs_close(fs_handle_t *f); static fs_node_ops_t ide_vfs_node_ops = { .open = ide_vfs_open, @@ -727,8 +727,8 @@ bool ide_vfs_stat(fs_node_ptr n, stat_t *st) { return true; } -size_t ide_vfs_read(fs_node_ptr f, size_t offset, size_t len, char* buf) { - ide_vfs_dev_t *d = (ide_vfs_dev_t*)f; +size_t ide_vfs_read(fs_handle_t *h, size_t offset, size_t len, char* buf) { + ide_vfs_dev_t *d = (ide_vfs_dev_t*)h->data; if (offset % d->block_size != 0) return 0; if (len % d->block_size != 0) return 0; @@ -739,8 +739,8 @@ size_t ide_vfs_read(fs_node_ptr f, size_t offset, size_t len, char* buf) { return len; } -size_t ide_vfs_write(fs_node_ptr f, size_t offset, size_t len, const char* buf) { - ide_vfs_dev_t *d = (ide_vfs_dev_t*)f; +size_t ide_vfs_write(fs_handle_t *h, size_t offset, size_t len, const char* buf) { + ide_vfs_dev_t *d = (ide_vfs_dev_t*)h->data; if (offset % d->block_size != 0) return 0; if (len % d->block_size != 0) return 0; @@ -764,7 +764,7 @@ int ide_vfs_ioctl(fs_node_ptr f, int command, void* data) { return ret; } -void ide_vfs_close(fs_node_ptr f) { +void ide_vfs_close(fs_handle_t *h) { // nothing to do } |