Messages in this thread | | | Date | Fri, 29 May 2015 13:29:26 -0500 | From | Aravind Gopalakrishnan <> | Subject | Re: [PATCH 5/6] edac, mce_amd_inj: Add README file |
| |
On 5/29/2015 10:38 AM, Borislav Petkov wrote: > > This one needs to be split in two - the second one adding the readme file...
Ack.
>> +static ssize_t >> +inj_readme_read(struct file *filp, char __user *ubuf, >> + size_t cnt, loff_t *ppos) >> +{ >> + return simple_read_from_buffer(ubuf, cnt, ppos, >> + readme_msg, strlen(readme_msg)); >> +} >> + >> +static const struct file_operations readme_fops = { >> + .read = inj_readme_read, >> +}; >> + >> static struct dfs_node { >> char *name; >> struct dentry *d; >> const struct file_operations *fops; >> + umode_t perm; >> } dfs_fls[] = { >> - { .name = "status", .fops = &status_fops }, >> - { .name = "misc", .fops = &misc_fops }, >> - { .name = "addr", .fops = &addr_fops }, >> - { .name = "bank", .fops = &bank_fops }, >> - { .name = "flags", .fops = &flags_fops }, >> - { .name = "cpu", .fops = &extcpu_fops }, >> + { .name = "status", .fops = &status_fops, S_IRUSR | S_IWUSR }, >> + { .name = "misc", .fops = &misc_fops, S_IRUSR | S_IWUSR }, >> + { .name = "addr", .fops = &addr_fops, S_IRUSR | S_IWUSR }, >> + { .name = "bank", .fops = &bank_fops, S_IRUSR | S_IWUSR }, >> + { .name = "flags", .fops = &flags_fops, S_IRUSR | S_IWUSR }, >> + { .name = "cpu", .fops = &extcpu_fops, S_IRUSR | S_IWUSR }, >> + { .name = "README", .fops = &readme_fops, S_IRUSR | S_IRGRP | >> + S_IROTH }, > ... and the first one adding perm to struct dfs_node. >
Will do.
Thanks, -Aravind.
| |