fs: make path argument of open const again
This commit is contained in:
parent
19f32aef3f
commit
16d5a07e5e
2 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue