Commit 7cb31aff authored by Art Haas's avatar Art Haas Committed by Jeff Garzik

[PATCH] C99 designated initializers for fs/proc

parent 5c3d8638
...@@ -310,7 +310,7 @@ static ssize_t pid_maps_read(struct file * file, char * buf, ...@@ -310,7 +310,7 @@ static ssize_t pid_maps_read(struct file * file, char * buf,
} }
static struct file_operations proc_maps_operations = { static struct file_operations proc_maps_operations = {
read: pid_maps_read, .read = pid_maps_read,
}; };
extern struct seq_operations mounts_op; extern struct seq_operations mounts_op;
...@@ -347,10 +347,10 @@ static int mounts_release(struct inode *inode, struct file *file) ...@@ -347,10 +347,10 @@ static int mounts_release(struct inode *inode, struct file *file)
} }
static struct file_operations proc_mounts_operations = { static struct file_operations proc_mounts_operations = {
open: mounts_open, .open = mounts_open,
read: seq_read, .read = seq_read,
llseek: seq_lseek, .llseek = seq_lseek,
release: mounts_release, .release = mounts_release,
}; };
#define PROC_BLOCK_SIZE (3*1024) /* 4K page size but our output routines use some slack for overruns */ #define PROC_BLOCK_SIZE (3*1024) /* 4K page size but our output routines use some slack for overruns */
...@@ -390,7 +390,7 @@ static ssize_t proc_info_read(struct file * file, char * buf, ...@@ -390,7 +390,7 @@ static ssize_t proc_info_read(struct file * file, char * buf,
} }
static struct file_operations proc_info_file_operations = { static struct file_operations proc_info_file_operations = {
read: proc_info_read, .read = proc_info_read,
}; };
#define MAY_PTRACE(p) \ #define MAY_PTRACE(p) \
...@@ -509,13 +509,13 @@ static ssize_t mem_write(struct file * file, const char * buf, ...@@ -509,13 +509,13 @@ static ssize_t mem_write(struct file * file, const char * buf,
#endif #endif
static struct file_operations proc_mem_operations = { static struct file_operations proc_mem_operations = {
read: mem_read, .read = mem_read,
write: mem_write, .write = mem_write,
open: mem_open, .open = mem_open,
}; };
static struct inode_operations proc_mem_inode_operations = { static struct inode_operations proc_mem_inode_operations = {
permission: proc_permission, .permission = proc_permission,
}; };
static int proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd) static int proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd)
...@@ -587,8 +587,8 @@ static int proc_pid_readlink(struct dentry * dentry, char * buffer, int buflen) ...@@ -587,8 +587,8 @@ static int proc_pid_readlink(struct dentry * dentry, char * buffer, int buflen)
} }
static struct inode_operations proc_pid_link_inode_operations = { static struct inode_operations proc_pid_link_inode_operations = {
readlink: proc_pid_readlink, .readlink = proc_pid_readlink,
follow_link: proc_pid_follow_link .follow_link = proc_pid_follow_link
}; };
#define NUMBUF 10 #define NUMBUF 10
...@@ -823,21 +823,21 @@ static int pid_delete_dentry(struct dentry * dentry) ...@@ -823,21 +823,21 @@ static int pid_delete_dentry(struct dentry * dentry)
static struct dentry_operations pid_fd_dentry_operations = static struct dentry_operations pid_fd_dentry_operations =
{ {
d_revalidate: pid_fd_revalidate, .d_revalidate = pid_fd_revalidate,
d_delete: pid_delete_dentry, .d_delete = pid_delete_dentry,
}; };
static struct dentry_operations pid_dentry_operations = static struct dentry_operations pid_dentry_operations =
{ {
d_revalidate: pid_revalidate, .d_revalidate = pid_revalidate,
d_delete: pid_delete_dentry, .d_delete = pid_delete_dentry,
}; };
static struct dentry_operations pid_base_dentry_operations = static struct dentry_operations pid_base_dentry_operations =
{ {
d_revalidate: pid_revalidate, .d_revalidate = pid_revalidate,
d_iput: pid_base_iput, .d_iput = pid_base_iput,
d_delete: pid_delete_dentry, .d_delete = pid_delete_dentry,
}; };
/* Lookups */ /* Lookups */
...@@ -918,16 +918,16 @@ static struct dentry *proc_lookupfd(struct inode * dir, struct dentry * dentry) ...@@ -918,16 +918,16 @@ static struct dentry *proc_lookupfd(struct inode * dir, struct dentry * dentry)
} }
static struct file_operations proc_fd_operations = { static struct file_operations proc_fd_operations = {
read: generic_read_dir, .read = generic_read_dir,
readdir: proc_readfd, .readdir = proc_readfd,
}; };
/* /*
* proc directories can do almost nothing.. * proc directories can do almost nothing..
*/ */
static struct inode_operations proc_fd_inode_operations = { static struct inode_operations proc_fd_inode_operations = {
lookup: proc_lookupfd, .lookup = proc_lookupfd,
permission: proc_permission, .permission = proc_permission,
}; };
/* SMP-safe */ /* SMP-safe */
...@@ -1032,12 +1032,12 @@ static struct dentry *proc_base_lookup(struct inode *dir, struct dentry *dentry) ...@@ -1032,12 +1032,12 @@ static struct dentry *proc_base_lookup(struct inode *dir, struct dentry *dentry)
} }
static struct file_operations proc_base_operations = { static struct file_operations proc_base_operations = {
read: generic_read_dir, .read = generic_read_dir,
readdir: proc_base_readdir, .readdir = proc_base_readdir,
}; };
static struct inode_operations proc_base_inode_operations = { static struct inode_operations proc_base_inode_operations = {
lookup: proc_base_lookup, .lookup = proc_base_lookup,
}; };
/* /*
...@@ -1058,8 +1058,8 @@ static int proc_self_follow_link(struct dentry *dentry, struct nameidata *nd) ...@@ -1058,8 +1058,8 @@ static int proc_self_follow_link(struct dentry *dentry, struct nameidata *nd)
} }
static struct inode_operations proc_self_inode_operations = { static struct inode_operations proc_self_inode_operations = {
readlink: proc_self_readlink, .readlink = proc_self_readlink,
follow_link: proc_self_follow_link, .follow_link = proc_self_follow_link,
}; };
/* SMP-safe */ /* SMP-safe */
......
...@@ -33,9 +33,9 @@ int proc_match(int len, const char *name,struct proc_dir_entry * de) ...@@ -33,9 +33,9 @@ int proc_match(int len, const char *name,struct proc_dir_entry * de)
} }
static struct file_operations proc_file_operations = { static struct file_operations proc_file_operations = {
llseek: proc_file_lseek, .llseek = proc_file_lseek,
read: proc_file_read, .read = proc_file_read,
write: proc_file_write, .write = proc_file_write,
}; };
#ifndef MIN #ifndef MIN
...@@ -230,8 +230,8 @@ static int proc_follow_link(struct dentry *dentry, struct nameidata *nd) ...@@ -230,8 +230,8 @@ static int proc_follow_link(struct dentry *dentry, struct nameidata *nd)
} }
static struct inode_operations proc_link_inode_operations = { static struct inode_operations proc_link_inode_operations = {
readlink: proc_readlink, .readlink = proc_readlink,
follow_link: proc_follow_link, .follow_link = proc_follow_link,
}; };
/* /*
...@@ -247,7 +247,7 @@ static int proc_delete_dentry(struct dentry * dentry) ...@@ -247,7 +247,7 @@ static int proc_delete_dentry(struct dentry * dentry)
static struct dentry_operations proc_dentry_operations = static struct dentry_operations proc_dentry_operations =
{ {
d_delete: proc_delete_dentry, .d_delete = proc_delete_dentry,
}; };
/* /*
...@@ -359,15 +359,15 @@ out: unlock_kernel(); ...@@ -359,15 +359,15 @@ out: unlock_kernel();
* the /proc directory. * the /proc directory.
*/ */
static struct file_operations proc_dir_operations = { static struct file_operations proc_dir_operations = {
read: generic_read_dir, .read = generic_read_dir,
readdir: proc_readdir, .readdir = proc_readdir,
}; };
/* /*
* proc directories can do almost nothing.. * proc directories can do almost nothing..
*/ */
static struct inode_operations proc_dir_inode_operations = { static struct inode_operations proc_dir_inode_operations = {
lookup: proc_lookup, .lookup = proc_lookup,
}; };
static int proc_register(struct proc_dir_entry * dir, struct proc_dir_entry * dp) static int proc_register(struct proc_dir_entry * dir, struct proc_dir_entry * dp)
......
...@@ -130,12 +130,12 @@ int __init proc_init_inodecache(void) ...@@ -130,12 +130,12 @@ int __init proc_init_inodecache(void)
} }
static struct super_operations proc_sops = { static struct super_operations proc_sops = {
alloc_inode: proc_alloc_inode, .alloc_inode = proc_alloc_inode,
destroy_inode: proc_destroy_inode, .destroy_inode = proc_destroy_inode,
read_inode: proc_read_inode, .read_inode = proc_read_inode,
drop_inode: generic_delete_inode, .drop_inode = generic_delete_inode,
delete_inode: proc_delete_inode, .delete_inode = proc_delete_inode,
statfs: simple_statfs, .statfs = simple_statfs,
}; };
static int parse_options(char *options,uid_t *uid,gid_t *gid) static int parse_options(char *options,uid_t *uid,gid_t *gid)
......
...@@ -30,8 +30,8 @@ static int open_kcore(struct inode * inode, struct file * filp) ...@@ -30,8 +30,8 @@ static int open_kcore(struct inode * inode, struct file * filp)
static ssize_t read_kcore(struct file *, char *, size_t, loff_t *); static ssize_t read_kcore(struct file *, char *, size_t, loff_t *);
struct file_operations proc_kcore_operations = { struct file_operations proc_kcore_operations = {
read: read_kcore, .read = read_kcore,
open: open_kcore, .open = open_kcore,
}; };
#ifdef CONFIG_KCORE_AOUT #ifdef CONFIG_KCORE_AOUT
......
...@@ -46,8 +46,8 @@ static unsigned int kmsg_poll(struct file *file, poll_table * wait) ...@@ -46,8 +46,8 @@ static unsigned int kmsg_poll(struct file *file, poll_table * wait)
struct file_operations proc_kmsg_operations = { struct file_operations proc_kmsg_operations = {
read: kmsg_read, .read = kmsg_read,
poll: kmsg_poll, .poll = kmsg_poll,
open: kmsg_open, .open = kmsg_open,
release: kmsg_release, .release = kmsg_release,
}; };
...@@ -246,10 +246,10 @@ static int cpuinfo_open(struct inode *inode, struct file *file) ...@@ -246,10 +246,10 @@ static int cpuinfo_open(struct inode *inode, struct file *file)
return seq_open(file, &cpuinfo_op); return seq_open(file, &cpuinfo_op);
} }
static struct file_operations proc_cpuinfo_operations = { static struct file_operations proc_cpuinfo_operations = {
open: cpuinfo_open, .open = cpuinfo_open,
read: seq_read, .read = seq_read,
llseek: seq_lseek, .llseek = seq_lseek,
release: seq_release, .release = seq_release,
}; };
#ifdef CONFIG_PROC_HARDWARE #ifdef CONFIG_PROC_HARDWARE
...@@ -276,10 +276,10 @@ static int partitions_open(struct inode *inode, struct file *file) ...@@ -276,10 +276,10 @@ static int partitions_open(struct inode *inode, struct file *file)
return seq_open(file, &partitions_op); return seq_open(file, &partitions_op);
} }
static struct file_operations proc_partitions_operations = { static struct file_operations proc_partitions_operations = {
open: partitions_open, .open = partitions_open,
read: seq_read, .read = seq_read,
llseek: seq_lseek, .llseek = seq_lseek,
release: seq_release, .release = seq_release,
}; };
#ifdef CONFIG_MODULES #ifdef CONFIG_MODULES
...@@ -289,10 +289,10 @@ static int modules_open(struct inode *inode, struct file *file) ...@@ -289,10 +289,10 @@ static int modules_open(struct inode *inode, struct file *file)
return seq_open(file, &modules_op); return seq_open(file, &modules_op);
} }
static struct file_operations proc_modules_operations = { static struct file_operations proc_modules_operations = {
open: modules_open, .open = modules_open,
read: seq_read, .read = seq_read,
llseek: seq_lseek, .llseek = seq_lseek,
release: seq_release, .release = seq_release,
}; };
extern struct seq_operations ksyms_op; extern struct seq_operations ksyms_op;
static int ksyms_open(struct inode *inode, struct file *file) static int ksyms_open(struct inode *inode, struct file *file)
...@@ -300,10 +300,10 @@ static int ksyms_open(struct inode *inode, struct file *file) ...@@ -300,10 +300,10 @@ static int ksyms_open(struct inode *inode, struct file *file)
return seq_open(file, &ksyms_op); return seq_open(file, &ksyms_op);
} }
static struct file_operations proc_ksyms_operations = { static struct file_operations proc_ksyms_operations = {
open: ksyms_open, .open = ksyms_open,
read: seq_read, .read = seq_read,
llseek: seq_lseek, .llseek = seq_lseek,
release: seq_release, .release = seq_release,
}; };
#endif #endif
...@@ -314,11 +314,11 @@ static int slabinfo_open(struct inode *inode, struct file *file) ...@@ -314,11 +314,11 @@ static int slabinfo_open(struct inode *inode, struct file *file)
return seq_open(file, &slabinfo_op); return seq_open(file, &slabinfo_op);
} }
static struct file_operations proc_slabinfo_operations = { static struct file_operations proc_slabinfo_operations = {
open: slabinfo_open, .open = slabinfo_open,
read: seq_read, .read = seq_read,
write: slabinfo_write, .write = slabinfo_write,
llseek: seq_lseek, .llseek = seq_lseek,
release: seq_release, .release = seq_release,
}; };
static int kstat_read_proc(char *page, char **start, off_t off, static int kstat_read_proc(char *page, char **start, off_t off,
...@@ -456,10 +456,10 @@ static int interrupts_open(struct inode *inode, struct file *file) ...@@ -456,10 +456,10 @@ static int interrupts_open(struct inode *inode, struct file *file)
return res; return res;
} }
static struct file_operations proc_interrupts_operations = { static struct file_operations proc_interrupts_operations = {
open: interrupts_open, .open = interrupts_open,
read: seq_read, .read = seq_read,
llseek: seq_lseek, .llseek = seq_lseek,
release: single_release, .release = single_release,
}; };
static int filesystems_read_proc(char *page, char **start, off_t off, static int filesystems_read_proc(char *page, char **start, off_t off,
...@@ -587,8 +587,8 @@ static ssize_t write_profile(struct file * file, const char * buf, ...@@ -587,8 +587,8 @@ static ssize_t write_profile(struct file * file, const char * buf,
} }
static struct file_operations proc_profile_operations = { static struct file_operations proc_profile_operations = {
read: read_profile, .read = read_profile,
write: write_profile, .write = write_profile,
}; };
struct proc_dir_entry *proc_root_kcore; struct proc_dir_entry *proc_root_kcore;
......
...@@ -31,9 +31,9 @@ static struct super_block *proc_get_sb(struct file_system_type *fs_type, ...@@ -31,9 +31,9 @@ static struct super_block *proc_get_sb(struct file_system_type *fs_type,
} }
static struct file_system_type proc_fs_type = { static struct file_system_type proc_fs_type = {
name: "proc", .name = "proc",
get_sb: proc_get_sb, .get_sb = proc_get_sb,
kill_sb: kill_anon_super, .kill_sb = kill_anon_super,
}; };
extern int __init proc_init_inodecache(void); extern int __init proc_init_inodecache(void);
...@@ -122,29 +122,29 @@ static int proc_root_readdir(struct file * filp, ...@@ -122,29 +122,29 @@ static int proc_root_readdir(struct file * filp,
* directory handling functions for that.. * directory handling functions for that..
*/ */
static struct file_operations proc_root_operations = { static struct file_operations proc_root_operations = {
read: generic_read_dir, .read = generic_read_dir,
readdir: proc_root_readdir, .readdir = proc_root_readdir,
}; };
/* /*
* proc root can do almost nothing.. * proc root can do almost nothing..
*/ */
static struct inode_operations proc_root_inode_operations = { static struct inode_operations proc_root_inode_operations = {
lookup: proc_root_lookup, .lookup = proc_root_lookup,
}; };
/* /*
* This is the root "inode" in the /proc tree.. * This is the root "inode" in the /proc tree..
*/ */
struct proc_dir_entry proc_root = { struct proc_dir_entry proc_root = {
low_ino: PROC_ROOT_INO, .low_ino = PROC_ROOT_INO,
namelen: 5, .namelen = 5,
name: "/proc", .name = "/proc",
mode: S_IFDIR | S_IRUGO | S_IXUGO, .mode = S_IFDIR | S_IRUGO | S_IXUGO,
nlink: 2, .nlink = 2,
proc_iops: &proc_root_inode_operations, .proc_iops = &proc_root_inode_operations,
proc_fops: &proc_root_operations, .proc_fops = &proc_root_operations,
parent: &proc_root, .parent = &proc_root,
}; };
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment