mirror of
https://github.com/sysprog21/lkmpg.git
synced 2024-11-26 02:09:48 +08:00
procfs: Enforce Linux naming style
This commit is contained in:
parent
45ac4087d0
commit
23c0a73c78
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
static struct proc_dir_entry *our_proc_file;
|
static struct proc_dir_entry *our_proc_file;
|
||||||
|
|
||||||
static ssize_t procfile_read(struct file *filePointer, char __user *buffer,
|
static ssize_t procfile_read(struct file *file_pointer, char __user *buffer,
|
||||||
size_t buffer_length, loff_t *offset)
|
size_t buffer_length, loff_t *offset)
|
||||||
{
|
{
|
||||||
char s[13] = "HelloWorld!\n";
|
char s[13] = "HelloWorld!\n";
|
||||||
|
@ -27,7 +27,7 @@ static ssize_t procfile_read(struct file *filePointer, char __user *buffer,
|
||||||
pr_info("copy_to_user failed\n");
|
pr_info("copy_to_user failed\n");
|
||||||
ret = 0;
|
ret = 0;
|
||||||
} else {
|
} else {
|
||||||
pr_info("procfile read %s\n", filePointer->f_path.dentry->d_name.name);
|
pr_info("procfile read %s\n", file_pointer->f_path.dentry->d_name.name);
|
||||||
*offset += len;
|
*offset += len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ static char procfs_buffer[PROCFS_MAX_SIZE];
|
||||||
static unsigned long procfs_buffer_size = 0;
|
static unsigned long procfs_buffer_size = 0;
|
||||||
|
|
||||||
/* This function is called then the /proc file is read */
|
/* This function is called then the /proc file is read */
|
||||||
static ssize_t procfile_read(struct file *filePointer, char __user *buffer,
|
static ssize_t procfile_read(struct file *file_pointer, char __user *buffer,
|
||||||
size_t buffer_length, loff_t *offset)
|
size_t buffer_length, loff_t *offset)
|
||||||
{
|
{
|
||||||
char s[13] = "HelloWorld!\n";
|
char s[13] = "HelloWorld!\n";
|
||||||
|
@ -36,7 +36,7 @@ static ssize_t procfile_read(struct file *filePointer, char __user *buffer,
|
||||||
pr_info("copy_to_user failed\n");
|
pr_info("copy_to_user failed\n");
|
||||||
ret = 0;
|
ret = 0;
|
||||||
} else {
|
} else {
|
||||||
pr_info("procfile read %s\n", filePointer->f_path.dentry->d_name.name);
|
pr_info("procfile read %s\n", file_pointer->f_path.dentry->d_name.name);
|
||||||
*offset += len;
|
*offset += len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user