diff --git a/include/gint/fs.h b/include/gint/fs.h index 9fd9205..6831dd2 100644 --- a/include/gint/fs.h +++ b/include/gint/fs.h @@ -78,7 +78,7 @@ void fs_free_descriptor(int fd); exact file descriptor reuse_fd is used. (This is useful to reopen standard streams.) In this case, the only possible return values are -1 and reuse_fd itself. */ -int open_generic(fs_descriptor_type_t *type, void *data, int reuse_fd); +int open_generic(fs_descriptor_type_t const *type, void *data, int reuse_fd); /* fs_path_normalize(): Normalize a path to eliminate ., .. and redundant / diff --git a/src/fs/fs.c b/src/fs/fs.c index 09919e4..5bea0db 100644 --- a/src/fs/fs.c +++ b/src/fs/fs.c @@ -42,7 +42,7 @@ void fs_free_descriptor(int fd) fdtable[fd].data = NULL; } -int open_generic(fs_descriptor_type_t *type, void *data, int fd) +int open_generic(fs_descriptor_type_t const *type, void *data, int fd) { if(!fdtable) { errno = ENOMEM; @@ -79,7 +79,7 @@ int open_generic(fs_descriptor_type_t *type, void *data, int fd) /* Standard streams */ -static fs_descriptor_type_t devnull = { +static fs_descriptor_type_t const devnull = { .read = NULL, .write = NULL, .lseek = NULL,