Skip to content

Commit 01f582a

Browse files
authored
Fix errors raised by missing-prototypes (#46)
Since commit 0fcb708, the Linux kernel globally enforces function prototype checks. This mandates that each function must have a declaration to confirm that both the caller and the callee anticipate the same argument types. Failing to meet this requirement could lead to serious bugs caused by mismatched prototypes. Therefore, this commit requires us to add function prototypes to the header files or to declare functions as static, ensuring compatibility with these changes.
1 parent 0f28083 commit 01f582a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

simplefs.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,19 @@ struct simplefs_dir_block {
108108

109109
/* superblock functions */
110110
int simplefs_fill_super(struct super_block *sb, void *data, int silent);
111+
void simplefs_kill_sb(struct super_block *sb);
111112

112113
/* inode functions */
113114
int simplefs_init_inode_cache(void);
114115
void simplefs_destroy_inode_cache(void);
115116
struct inode *simplefs_iget(struct super_block *sb, unsigned long ino);
116117

118+
/* dentry function */
119+
struct dentry *simplefs_mount(struct file_system_type *fs_type,
120+
int flags,
121+
const char *dev_name,
122+
void *data);
123+
117124
/* file functions */
118125
extern const struct file_operations simplefs_file_ops;
119126
extern const struct file_operations simplefs_dir_ops;

0 commit comments

Comments
 (0)