Commit 5383f8ec authored by Art Haas's avatar Art Haas Committed by Linus Torvalds

[PATCH] designated initializer patches for fs_

  Here's a resend of C99 patches for the files in fs.
parent 5b6797cb
......@@ -53,7 +53,7 @@ static kmem_cache_t *kioctx_cachep;
/* Used for rare fput completion. */
static void aio_fput_routine(void *);
static struct tq_struct fput_tqueue = {
routine: aio_fput_routine,
.routine = aio_fput_routine,
};
static spinlock_t fput_lock = SPIN_LOCK_UNLOCKED;
......
......@@ -30,37 +30,37 @@ static int return_EIO(void)
static struct file_operations bad_file_ops =
{
llseek: EIO_ERROR,
read: EIO_ERROR,
write: EIO_ERROR,
readdir: EIO_ERROR,
poll: EIO_ERROR,
ioctl: EIO_ERROR,
mmap: EIO_ERROR,
open: EIO_ERROR,
flush: EIO_ERROR,
release: EIO_ERROR,
fsync: EIO_ERROR,
fasync: EIO_ERROR,
lock: EIO_ERROR,
.llseek = EIO_ERROR,
.read = EIO_ERROR,
.write = EIO_ERROR,
.readdir = EIO_ERROR,
.poll = EIO_ERROR,
.ioctl = EIO_ERROR,
.mmap = EIO_ERROR,
.open = EIO_ERROR,
.flush = EIO_ERROR,
.release = EIO_ERROR,
.fsync = EIO_ERROR,
.fasync = EIO_ERROR,
.lock = EIO_ERROR,
};
struct inode_operations bad_inode_ops =
{
create: EIO_ERROR,
lookup: EIO_ERROR,
link: EIO_ERROR,
unlink: EIO_ERROR,
symlink: EIO_ERROR,
mkdir: EIO_ERROR,
rmdir: EIO_ERROR,
mknod: EIO_ERROR,
rename: EIO_ERROR,
readlink: EIO_ERROR,
follow_link: bad_follow_link,
truncate: EIO_ERROR,
permission: EIO_ERROR,
getattr: EIO_ERROR,
.create = EIO_ERROR,
.lookup = EIO_ERROR,
.link = EIO_ERROR,
.unlink = EIO_ERROR,
.symlink = EIO_ERROR,
.mkdir = EIO_ERROR,
.rmdir = EIO_ERROR,
.mknod = EIO_ERROR,
.rename = EIO_ERROR,
.readlink = EIO_ERROR,
.follow_link = bad_follow_link,
.truncate = EIO_ERROR,
.permission = EIO_ERROR,
.getattr = EIO_ERROR,
};
......
......@@ -37,11 +37,11 @@ static int aout_core_dump(long signr, struct pt_regs * regs, struct file *file);
extern void dump_thread(struct pt_regs *, struct user *);
static struct linux_binfmt aout_format = {
module: THIS_MODULE,
load_binary: load_aout_binary,
load_shlib: load_aout_library,
core_dump: aout_core_dump,
min_coredump: PAGE_SIZE
.module = THIS_MODULE,
.load_binary = load_aout_binary,
.load_shlib = load_aout_library,
.core_dump = aout_core_dump,
.min_coredump = PAGE_SIZE
};
static void set_brk(unsigned long start, unsigned long end)
......
......@@ -71,11 +71,11 @@ static int elf_core_dump(long signr, struct pt_regs * regs, struct file * file);
#define ELF_PAGEALIGN(_v) (((_v) + ELF_MIN_ALIGN - 1) & ~(ELF_MIN_ALIGN - 1))
static struct linux_binfmt elf_format = {
module: THIS_MODULE,
load_binary: load_elf_binary,
load_shlib: load_elf_library,
core_dump: elf_core_dump,
min_coredump: ELF_EXEC_PAGESIZE
.module = THIS_MODULE,
.load_binary = load_elf_binary,
.load_shlib = load_elf_library,
.core_dump = elf_core_dump,
.min_coredump = ELF_EXEC_PAGESIZE
};
#define BAD_ADDR(x) ((unsigned long)(x) > TASK_SIZE)
......
......@@ -96,8 +96,8 @@ static int load_em86(struct linux_binprm *bprm,struct pt_regs *regs)
}
struct linux_binfmt em86_format = {
module: THIS_MODULE,
load_binary: load_em86,
.module = THIS_MODULE,
.load_binary = load_em86,
};
static int __init init_em86_binfmt(void)
......
......@@ -485,8 +485,8 @@ static ssize_t bm_entry_write(struct file *file, const char *buffer,
}
static struct file_operations bm_entry_operations = {
read: bm_entry_read,
write: bm_entry_write,
.read = bm_entry_read,
.write = bm_entry_write,
};
static struct file_system_type bm_fs_type;
......@@ -566,7 +566,7 @@ static ssize_t bm_register_write(struct file *file, const char *buffer,
}
static struct file_operations bm_register_operations = {
write: bm_register_write,
.write = bm_register_write,
};
/* /status */
......@@ -613,21 +613,21 @@ static ssize_t bm_status_write(struct file * file, const char * buffer,
}
static struct file_operations bm_status_operations = {
read: bm_status_read,
write: bm_status_write,
.read = bm_status_read,
.write = bm_status_write,
};
/* Superblock handling */
static struct super_operations s_ops = {
statfs: simple_statfs,
drop_inode: generic_delete_inode,
clear_inode: bm_clear_inode,
.statfs = simple_statfs,
.drop_inode = generic_delete_inode,
.clear_inode = bm_clear_inode,
};
static int bm_fill_super(struct super_block * sb, void * data, int silent)
{
struct qstr names[2] = {{name:"status"}, {name:"register"}};
struct qstr names[2] = {{.name = "status"}, {.name = "register"}};
struct inode * inode;
struct dentry * dentry[3];
int i;
......@@ -688,15 +688,15 @@ static struct super_block *bm_get_sb(struct file_system_type *fs_type,
}
static struct linux_binfmt misc_format = {
module: THIS_MODULE,
load_binary: load_misc_binary,
.module = THIS_MODULE,
.load_binary = load_misc_binary,
};
static struct file_system_type bm_fs_type = {
owner: THIS_MODULE,
name: "binfmt_misc",
get_sb: bm_get_sb,
kill_sb: kill_litter_super,
.owner = THIS_MODULE,
.name = "binfmt_misc",
.get_sb = bm_get_sb,
.kill_sb = kill_litter_super,
};
static int __init init_misc_binfmt(void)
......
......@@ -95,8 +95,8 @@ static int load_script(struct linux_binprm *bprm,struct pt_regs *regs)
}
struct linux_binfmt script_format = {
module: THIS_MODULE,
load_binary: load_script,
.module = THIS_MODULE,
.load_binary = load_script,
};
static int __init init_script_binfmt(void)
......
......@@ -198,9 +198,9 @@ static struct super_block *bd_get_sb(struct file_system_type *fs_type,
}
static struct file_system_type bd_type = {
name: "bdev",
get_sb: bd_get_sb,
kill_sb: kill_anon_super,
.name = "bdev",
.get_sb = bd_get_sb,
.kill_sb = kill_anon_super,
};
static struct vfsmount *bd_mnt;
......
......@@ -168,7 +168,7 @@ int chrdev_open(struct inode * inode, struct file * filp)
* depending on the special file...
*/
static struct file_operations def_chr_fops = {
open: chrdev_open,
.open = chrdev_open,
};
/*
......@@ -199,7 +199,7 @@ static int sock_no_open(struct inode *irrelevant, struct file *dontcare)
}
static struct file_operations bad_sock_fops = {
open: sock_no_open
.open = sock_no_open
};
void init_special_inode(struct inode *inode, umode_t mode, int rdev)
......
......@@ -1211,13 +1211,13 @@ int dquot_transfer(struct inode *inode, struct iattr *iattr)
* Definitions of diskquota operations.
*/
struct dquot_operations dquot_operations = {
initialize: dquot_initialize, /* mandatory */
drop: dquot_drop, /* mandatory */
alloc_space: dquot_alloc_space,
alloc_inode: dquot_alloc_inode,
free_space: dquot_free_space,
free_inode: dquot_free_inode,
transfer: dquot_transfer
.initialize = dquot_initialize, /* mandatory */
.drop = dquot_drop, /* mandatory */
.alloc_space = dquot_alloc_space,
.alloc_inode = dquot_alloc_inode,
.free_space = dquot_free_space,
.free_inode = dquot_free_inode,
.transfer = dquot_transfer
};
static inline void set_enable_flags(struct quota_info *dqopt, int type)
......@@ -1471,13 +1471,13 @@ int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii)
}
struct quotactl_ops vfs_quotactl_ops = {
quota_on: vfs_quota_on,
quota_off: vfs_quota_off,
quota_sync: vfs_quota_sync,
get_info: vfs_get_dqinfo,
set_info: vfs_set_dqinfo,
get_dqblk: vfs_get_dqblk,
set_dqblk: vfs_set_dqblk
.quota_on = vfs_quota_on,
.quota_off = vfs_quota_off,
.quota_sync = vfs_quota_sync,
.get_info = vfs_get_dqinfo,
.set_info = vfs_set_dqinfo,
.get_dqblk = vfs_get_dqblk,
.set_dqblk = vfs_set_dqblk
};
static ctl_table fs_dqstats_table[] = {
......
......@@ -154,5 +154,5 @@ static int fifo_open(struct inode *inode, struct file *filp)
* depending on the access mode of the file...
*/
struct file_operations def_fifo_fops = {
open: fifo_open, /* will set read or write pipe_fops */
.open = fifo_open, /* will set read or write pipe_fops */
};
......@@ -32,7 +32,7 @@ int simple_sync_file(struct file * file, struct dentry *dentry, int datasync)
int dcache_dir_open(struct inode *inode, struct file *file)
{
static struct qstr cursor_name = {len:1, name:"."};
static struct qstr cursor_name = {.len = 1, .name = "."};
file->private_data = d_alloc(file->f_dentry, &cursor_name);
......@@ -151,15 +151,15 @@ ssize_t generic_read_dir(struct file *filp, char *buf, size_t siz, loff_t *ppos)
}
struct file_operations simple_dir_operations = {
open: dcache_dir_open,
release: dcache_dir_close,
llseek: dcache_dir_lseek,
read: generic_read_dir,
readdir: dcache_readdir,
.open = dcache_dir_open,
.release = dcache_dir_close,
.llseek = dcache_dir_lseek,
.read = generic_read_dir,
.readdir = dcache_readdir,
};
struct inode_operations simple_dir_inode_operations = {
lookup: simple_lookup,
.lookup = simple_lookup,
};
/*
......@@ -171,10 +171,10 @@ get_sb_pseudo(struct file_system_type *fs_type, char *name,
struct super_operations *ops, unsigned long magic)
{
struct super_block *s = sget(fs_type, NULL, set_anon_super, NULL);
static struct super_operations default_ops = {statfs: simple_statfs};
static struct super_operations default_ops = {.statfs = simple_statfs};
struct dentry *dentry;
struct inode *root;
struct qstr d_name = {name:name, len:strlen(name)};
struct qstr d_name = {.name = name, .len = strlen(name)};
if (IS_ERR(s))
return s;
......
......@@ -2230,6 +2230,6 @@ int page_symlink(struct inode *inode, const char *symname, int len)
}
struct inode_operations page_symlink_inode_operations = {
readlink: page_readlink,
follow_link: page_follow_link,
.readlink = page_readlink,
.follow_link = page_follow_link,
};
......@@ -239,10 +239,10 @@ static int show_vfsmnt(struct seq_file *m, void *v)
}
struct seq_operations mounts_op = {
start: m_start,
next: m_next,
stop: m_stop,
show: show_vfsmnt
.start = m_start,
.next = m_next,
.stop = m_stop,
.show = show_vfsmnt
};
/*
......
......@@ -444,69 +444,69 @@ pipe_rdwr_open(struct inode *inode, struct file *filp)
* are also used in linux/fs/fifo.c to do operations on FIFOs.
*/
struct file_operations read_fifo_fops = {
llseek: no_llseek,
read: pipe_read,
write: bad_pipe_w,
poll: fifo_poll,
ioctl: pipe_ioctl,
open: pipe_read_open,
release: pipe_read_release,
fasync: pipe_read_fasync,
.llseek = no_llseek,
.read = pipe_read,
.write = bad_pipe_w,
.poll = fifo_poll,
.ioctl = pipe_ioctl,
.open = pipe_read_open,
.release = pipe_read_release,
.fasync = pipe_read_fasync,
};
struct file_operations write_fifo_fops = {
llseek: no_llseek,
read: bad_pipe_r,
write: pipe_write,
poll: fifo_poll,
ioctl: pipe_ioctl,
open: pipe_write_open,
release: pipe_write_release,
fasync: pipe_write_fasync,
.llseek = no_llseek,
.read = bad_pipe_r,
.write = pipe_write,
.poll = fifo_poll,
.ioctl = pipe_ioctl,
.open = pipe_write_open,
.release = pipe_write_release,
.fasync = pipe_write_fasync,
};
struct file_operations rdwr_fifo_fops = {
llseek: no_llseek,
read: pipe_read,
write: pipe_write,
poll: fifo_poll,
ioctl: pipe_ioctl,
open: pipe_rdwr_open,
release: pipe_rdwr_release,
fasync: pipe_rdwr_fasync,
.llseek = no_llseek,
.read = pipe_read,
.write = pipe_write,
.poll = fifo_poll,
.ioctl = pipe_ioctl,
.open = pipe_rdwr_open,
.release = pipe_rdwr_release,
.fasync = pipe_rdwr_fasync,
};
struct file_operations read_pipe_fops = {
llseek: no_llseek,
read: pipe_read,
write: bad_pipe_w,
poll: pipe_poll,
ioctl: pipe_ioctl,
open: pipe_read_open,
release: pipe_read_release,
fasync: pipe_read_fasync,
.llseek = no_llseek,
.read = pipe_read,
.write = bad_pipe_w,
.poll = pipe_poll,
.ioctl = pipe_ioctl,
.open = pipe_read_open,
.release = pipe_read_release,
.fasync = pipe_read_fasync,
};
struct file_operations write_pipe_fops = {
llseek: no_llseek,
read: bad_pipe_r,
write: pipe_write,
poll: pipe_poll,
ioctl: pipe_ioctl,
open: pipe_write_open,
release: pipe_write_release,
fasync: pipe_write_fasync,
.llseek = no_llseek,
.read = bad_pipe_r,
.write = pipe_write,
.poll = pipe_poll,
.ioctl = pipe_ioctl,
.open = pipe_write_open,
.release = pipe_write_release,
.fasync = pipe_write_fasync,
};
struct file_operations rdwr_pipe_fops = {
llseek: no_llseek,
read: pipe_read,
write: pipe_write,
poll: pipe_poll,
ioctl: pipe_ioctl,
open: pipe_rdwr_open,
release: pipe_rdwr_release,
fasync: pipe_rdwr_fasync,
.llseek = no_llseek,
.read = pipe_read,
.write = pipe_write,
.poll = pipe_poll,
.ioctl = pipe_ioctl,
.open = pipe_rdwr_open,
.release = pipe_rdwr_release,
.fasync = pipe_rdwr_fasync,
};
struct inode* pipe_new(struct inode* inode)
......@@ -541,7 +541,7 @@ static int pipefs_delete_dentry(struct dentry *dentry)
return 1;
}
static struct dentry_operations pipefs_dentry_operations = {
d_delete: pipefs_delete_dentry,
.d_delete = pipefs_delete_dentry,
};
static struct inode * get_pipe_inode(void)
......@@ -672,9 +672,9 @@ static struct super_block *pipefs_get_sb(struct file_system_type *fs_type,
}
static struct file_system_type pipe_fs_type = {
name: "pipefs",
get_sb: pipefs_get_sb,
kill_sb: kill_anon_super,
.name = "pipefs",
.get_sb = pipefs_get_sb,
.kill_sb = kill_anon_super,
};
static int __init init_pipe_fs(void)
......
......@@ -210,18 +210,18 @@ static int v1_write_file_info(struct super_block *sb, int type)
}
static struct quota_format_ops v1_format_ops = {
check_quota_file: v1_check_quota_file,
read_file_info: v1_read_file_info,
write_file_info: v1_write_file_info,
free_file_info: NULL,
read_dqblk: v1_read_dqblk,
commit_dqblk: v1_commit_dqblk,
.check_quota_file = v1_check_quota_file,
.read_file_info = v1_read_file_info,
.write_file_info = v1_write_file_info,
.free_file_info = NULL,
.read_dqblk = v1_read_dqblk,
.commit_dqblk = v1_commit_dqblk,
};
static struct quota_format_type v1_quota_format = {
qf_fmt_id: QFMT_VFS_OLD,
qf_ops: &v1_format_ops,
qf_owner: THIS_MODULE
.qf_fmt_id = QFMT_VFS_OLD,
.qf_ops = &v1_format_ops,
.qf_owner = THIS_MODULE
};
static int __init init_v1_quota_format(void)
......
......@@ -662,18 +662,18 @@ static int v2_commit_dquot(struct dquot *dquot)
}
static struct quota_format_ops v2_format_ops = {
check_quota_file: v2_check_quota_file,
read_file_info: v2_read_file_info,
write_file_info: v2_write_file_info,
free_file_info: NULL,
read_dqblk: v2_read_dquot,
commit_dqblk: v2_commit_dquot,
.check_quota_file = v2_check_quota_file,
.read_file_info = v2_read_file_info,
.write_file_info = v2_write_file_info,
.free_file_info = NULL,
.read_dqblk = v2_read_dquot,
.commit_dqblk = v2_commit_dquot,
};
static struct quota_format_type v2_quota_format = {
qf_fmt_id: QFMT_VFS_V0,
qf_ops: &v2_format_ops,
qf_owner: THIS_MODULE
.qf_fmt_id = QFMT_VFS_V0,
.qf_ops = &v2_format_ops,
.qf_owner = THIS_MODULE
};
static int __init init_v2_quota_format(void)
......
......@@ -16,10 +16,10 @@
#include <asm/uaccess.h>
struct file_operations generic_ro_fops = {
llseek: generic_file_llseek,
read: generic_file_read,
mmap: generic_file_mmap,
sendfile: generic_file_sendfile,
.llseek = generic_file_llseek,
.read = generic_file_read,
.mmap = generic_file_mmap,
.sendfile = generic_file_sendfile,
};
loff_t generic_file_llseek(struct file *file, loff_t offset, int origin)
......
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