lkml.org 
[lkml]   [2015]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.



\
 
 \ /
  Last update: 2015-05-29 20:41    [W:0.064 / U:0.372 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site