diff --git a/fs/ext2.c b/fs/ext2.c index 808843b..ab0e532 100644 --- a/fs/ext2.c +++ b/fs/ext2.c @@ -526,7 +526,7 @@ static int ext2_free_inode(struct fs *vfs, ino_t ino_num) return 0; } -static long ext2_inode_find_by_name(struct ext2fs *fs, char *path) +static long ext2_inode_find_by_name(struct ext2fs *fs, const char *path) { struct ext2_inode *inode = kmalloc(sizeof(struct ext2_inode), ALLOC_DMA); @@ -599,7 +599,7 @@ found: return inode_no; } -static int ext2_open_file(struct fs *vfs, struct file *file, char *path) +static int ext2_open_file(struct fs *vfs, struct file *file, const char *path) { /* find the inode of the file */ struct ext2fs *fs = (struct ext2fs *)vfs->fs; diff --git a/include/fs/vfs.h b/include/fs/vfs.h index 360cfa9..72cade6 100644 --- a/include/fs/vfs.h +++ b/include/fs/vfs.h @@ -97,7 +97,7 @@ struct file_descriptor { struct fs_ops { int (*read)(struct fs *fs, struct file *file, void *buf, size_t offset, size_t size); int (*write)(struct fs *fs, struct file *file, void *buf, size_t offset, size_t size); - int (*open)(struct fs *fs, struct file *file, char *path); + int (*open)(struct fs *fs, struct file *file, const char *path); int (*close)(struct fs *fs, struct file *file); int (*readdir)(struct fs *fs, uint32_t ino, struct dirent **dir); };