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,
}
static struct file_operations proc_maps_operations = {
read: pid_maps_read,
.read = pid_maps_read,
};
extern struct seq_operations mounts_op;
......@@ -347,10 +347,10 @@ static int mounts_release(struct inode *inode, struct file *file)
}
static struct file_operations proc_mounts_operations = {
open: mounts_open,
read: seq_read,
llseek: seq_lseek,
release: mounts_release,
.open = mounts_open,
.read = seq_read,
.llseek = seq_lseek,
.release = mounts_release,
};
#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,
}
static struct file_operations proc_info_file_operations = {
read: proc_info_read,
.read = proc_info_read,
};
#define MAY_PTRACE(p) \
......@@ -509,13 +509,13 @@ static ssize_t mem_write(struct file * file, const char * buf,
#endif
static struct file_operations proc_mem_operations = {
read: mem_read,
write: mem_write,
open: mem_open,
.read = mem_read,
.write = mem_write,
.open = mem_open,
};
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)
......@@ -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 = {
readlink: proc_pid_readlink,
follow_link: proc_pid_follow_link
.readlink = proc_pid_readlink,
.follow_link = proc_pid_follow_link
};
#define NUMBUF 10
......@@ -823,21 +823,21 @@ static int pid_delete_dentry(struct dentry * dentry)
static struct dentry_operations pid_fd_dentry_operations =
{
d_revalidate: pid_fd_revalidate,
d_delete: pid_delete_dentry,
.d_revalidate = pid_fd_revalidate,
.d_delete = pid_delete_dentry,
};
static struct dentry_operations pid_dentry_operations =
{
d_revalidate: pid_revalidate,
d_delete: pid_delete_dentry,
.d_revalidate = pid_revalidate,
.d_delete = pid_delete_dentry,
};
static struct dentry_operations pid_base_dentry_operations =
{
d_revalidate: pid_revalidate,
d_iput: pid_base_iput,
d_delete: pid_delete_dentry,
.d_revalidate = pid_revalidate,
.d_iput = pid_base_iput,
.d_delete = pid_delete_dentry,
};
/* Lookups */
......@@ -918,16 +918,16 @@ static struct dentry *proc_lookupfd(struct inode * dir, struct dentry * dentry)
}
static struct file_operations proc_fd_operations = {
read: generic_read_dir,
readdir: proc_readfd,
.read = generic_read_dir,
.readdir = proc_readfd,
};
/*
* proc directories can do almost nothing..
*/
static struct inode_operations proc_fd_inode_operations = {
lookup: proc_lookupfd,
permission: proc_permission,
.lookup = proc_lookupfd,
.permission = proc_permission,
};
/* SMP-safe */
......@@ -1032,12 +1032,12 @@ static struct dentry *proc_base_lookup(struct inode *dir, struct dentry *dentry)
}
static struct file_operations proc_base_operations = {
read: generic_read_dir,
readdir: proc_base_readdir,
.read = generic_read_dir,
.readdir = proc_base_readdir,
};
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)
}
static struct inode_operations proc_self_inode_operations = {
readlink: proc_self_readlink,
follow_link: proc_self_follow_link,
.readlink = proc_self_readlink,
.follow_link = proc_self_follow_link,
};
/* SMP-safe */
......
......@@ -33,9 +33,9 @@ int proc_match(int len, const char *name,struct proc_dir_entry * de)
}
static struct file_operations proc_file_operations = {
llseek: proc_file_lseek,
read: proc_file_read,
write: proc_file_write,
.llseek = proc_file_lseek,
.read = proc_file_read,
.write = proc_file_write,
};
#ifndef MIN
......@@ -230,8 +230,8 @@ static int proc_follow_link(struct dentry *dentry, struct nameidata *nd)
}
static struct inode_operations proc_link_inode_operations = {
readlink: proc_readlink,
follow_link: proc_follow_link,
.readlink = proc_readlink,
.follow_link = proc_follow_link,
};
/*
......@@ -247,7 +247,7 @@ static int proc_delete_dentry(struct dentry * dentry)
static struct dentry_operations proc_dentry_operations =
{
d_delete: proc_delete_dentry,
.d_delete = proc_delete_dentry,
};
/*
......@@ -359,15 +359,15 @@ out: unlock_kernel();
* the /proc directory.
*/
static struct file_operations proc_dir_operations = {
read: generic_read_dir,
readdir: proc_readdir,
.read = generic_read_dir,
.readdir = proc_readdir,
};
/*
* proc directories can do almost nothing..
*/
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)
......
......@@ -130,12 +130,12 @@ int __init proc_init_inodecache(void)
}
static struct super_operations proc_sops = {
alloc_inode: proc_alloc_inode,
destroy_inode: proc_destroy_inode,
read_inode: proc_read_inode,
drop_inode: generic_delete_inode,
delete_inode: proc_delete_inode,
statfs: simple_statfs,
.alloc_inode = proc_alloc_inode,
.destroy_inode = proc_destroy_inode,
.read_inode = proc_read_inode,
.drop_inode = generic_delete_inode,
.delete_inode = proc_delete_inode,
.statfs = simple_statfs,
};
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)
static ssize_t read_kcore(struct file *, char *, size_t, loff_t *);
struct file_operations proc_kcore_operations = {
read: read_kcore,
open: open_kcore,
.read = read_kcore,
.open = open_kcore,
};
#ifdef CONFIG_KCORE_AOUT
......
......@@ -46,8 +46,8 @@ static unsigned int kmsg_poll(struct file *file, poll_table * wait)
struct file_operations proc_kmsg_operations = {
read: kmsg_read,
poll: kmsg_poll,
open: kmsg_open,
release: kmsg_release,
.read = kmsg_read,
.poll = kmsg_poll,
.open = kmsg_open,
.release = kmsg_release,
};
......@@ -246,10 +246,10 @@ static int cpuinfo_open(struct inode *inode, struct file *file)
return seq_open(file, &cpuinfo_op);
}
static struct file_operations proc_cpuinfo_operations = {
open: cpuinfo_open,
read: seq_read,
llseek: seq_lseek,
release: seq_release,
.open = cpuinfo_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
};
#ifdef CONFIG_PROC_HARDWARE
......@@ -276,10 +276,10 @@ static int partitions_open(struct inode *inode, struct file *file)
return seq_open(file, &partitions_op);
}
static struct file_operations proc_partitions_operations = {
open: partitions_open,
read: seq_read,
llseek: seq_lseek,
release: seq_release,
.open = partitions_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
};
#ifdef CONFIG_MODULES
......@@ -289,10 +289,10 @@ static int modules_open(struct inode *inode, struct file *file)
return seq_open(file, &modules_op);
}
static struct file_operations proc_modules_operations = {
open: modules_open,
read: seq_read,
llseek: seq_lseek,
release: seq_release,
.open = modules_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
};
extern struct seq_operations ksyms_op;
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);
}
static struct file_operations proc_ksyms_operations = {
open: ksyms_open,
read: seq_read,
llseek: seq_lseek,
release: seq_release,
.open = ksyms_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
};
#endif
......@@ -314,11 +314,11 @@ static int slabinfo_open(struct inode *inode, struct file *file)
return seq_open(file, &slabinfo_op);
}
static struct file_operations proc_slabinfo_operations = {
open: slabinfo_open,
read: seq_read,
write: slabinfo_write,
llseek: seq_lseek,
release: seq_release,
.open = slabinfo_open,
.read = seq_read,
.write = slabinfo_write,
.llseek = seq_lseek,
.release = seq_release,
};
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)
return res;
}
static struct file_operations proc_interrupts_operations = {
open: interrupts_open,
read: seq_read,
llseek: seq_lseek,
release: single_release,
.open = interrupts_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
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,
}
static struct file_operations proc_profile_operations = {
read: read_profile,
write: write_profile,
.read = read_profile,
.write = write_profile,
};
struct proc_dir_entry *proc_root_kcore;
......
......@@ -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 = {
name: "proc",
get_sb: proc_get_sb,
kill_sb: kill_anon_super,
.name = "proc",
.get_sb = proc_get_sb,
.kill_sb = kill_anon_super,
};
extern int __init proc_init_inodecache(void);
......@@ -122,29 +122,29 @@ static int proc_root_readdir(struct file * filp,
* directory handling functions for that..
*/
static struct file_operations proc_root_operations = {
read: generic_read_dir,
readdir: proc_root_readdir,
.read = generic_read_dir,
.readdir = proc_root_readdir,
};
/*
* proc root can do almost nothing..
*/
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..
*/
struct proc_dir_entry proc_root = {
low_ino: PROC_ROOT_INO,
namelen: 5,
name: "/proc",
mode: S_IFDIR | S_IRUGO | S_IXUGO,
nlink: 2,
proc_iops: &proc_root_inode_operations,
proc_fops: &proc_root_operations,
parent: &proc_root,
.low_ino = PROC_ROOT_INO,
.namelen = 5,
.name = "/proc",
.mode = S_IFDIR | S_IRUGO | S_IXUGO,
.nlink = 2,
.proc_iops = &proc_root_inode_operations,
.proc_fops = &proc_root_operations,
.parent = &proc_root,
};
#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