Commit f0fd4c1d authored by Art Haas's avatar Art Haas Committed by Linus Torvalds

[PATCH] named initializers for fs/hfs

parent 1b89d8d6
......@@ -59,30 +59,30 @@ const struct hfs_name hfs_cap_reserved2[] = {
#define DOT_ROOTINFO (&hfs_cap_reserved2[0])
struct file_operations hfs_cap_dir_operations = {
read: generic_read_dir,
readdir: cap_readdir,
fsync: file_fsync,
.read = generic_read_dir,
.readdir = cap_readdir,
.fsync = file_fsync,
};
struct inode_operations hfs_cap_ndir_inode_operations = {
create: hfs_create,
lookup: cap_lookup,
unlink: hfs_unlink,
mkdir: hfs_mkdir,
rmdir: hfs_rmdir,
rename: hfs_rename,
setattr: hfs_notify_change,
.create = hfs_create,
.lookup = cap_lookup,
.unlink = hfs_unlink,
.mkdir = hfs_mkdir,
.rmdir = hfs_rmdir,
.rename = hfs_rename,
.setattr = hfs_notify_change,
};
struct inode_operations hfs_cap_fdir_inode_operations = {
lookup: cap_lookup,
setattr: hfs_notify_change,
.lookup = cap_lookup,
.setattr = hfs_notify_change,
};
struct inode_operations hfs_cap_rdir_inode_operations = {
create: hfs_create,
lookup: cap_lookup,
setattr: hfs_notify_change,
.create = hfs_create,
.lookup = cap_lookup,
.setattr = hfs_notify_change,
};
/*================ File-local functions ================*/
......
......@@ -58,19 +58,19 @@ const struct hfs_name hfs_dbl_reserved2[] = {
#define PCNT_ROOTINFO (&hfs_dbl_reserved2[1])
struct file_operations hfs_dbl_dir_operations = {
read: generic_read_dir,
readdir: dbl_readdir,
fsync: file_fsync,
.read = generic_read_dir,
.readdir = dbl_readdir,
.fsync = file_fsync,
};
struct inode_operations hfs_dbl_dir_inode_operations = {
create: dbl_create,
lookup: dbl_lookup,
unlink: dbl_unlink,
mkdir: dbl_mkdir,
rmdir: dbl_rmdir,
rename: dbl_rename,
setattr: hfs_notify_change,
.create = dbl_create,
.lookup = dbl_lookup,
.unlink = dbl_unlink,
.mkdir = dbl_mkdir,
.rmdir = dbl_rmdir,
.rename = dbl_rename,
.setattr = hfs_notify_change,
};
......
......@@ -64,27 +64,27 @@ const struct hfs_name hfs_nat_reserved2[] = {
#define ROOTINFO (&hfs_nat_reserved2[0])
struct file_operations hfs_nat_dir_operations = {
read: generic_read_dir,
readdir: nat_readdir,
fsync: file_fsync,
.read = generic_read_dir,
.readdir = nat_readdir,
.fsync = file_fsync,
};
struct inode_operations hfs_nat_ndir_inode_operations = {
create: hfs_create,
lookup: nat_lookup,
unlink: hfs_unlink,
mkdir: hfs_mkdir,
rmdir: nat_rmdir,
rename: hfs_rename,
setattr: hfs_notify_change,
.create = hfs_create,
.lookup = nat_lookup,
.unlink = hfs_unlink,
.mkdir = hfs_mkdir,
.rmdir = nat_rmdir,
.rename = hfs_rename,
.setattr = hfs_notify_change,
};
struct inode_operations hfs_nat_hdir_inode_operations = {
create: hfs_create,
lookup: nat_lookup,
unlink: nat_hdr_unlink,
rename: nat_hdr_rename,
setattr: hfs_notify_change,
.create = hfs_create,
.lookup = nat_lookup,
.unlink = nat_hdr_unlink,
.rename = nat_hdr_rename,
.setattr = hfs_notify_change,
};
/*================ File-local functions ================*/
......
......@@ -34,16 +34,16 @@ static void hfs_file_truncate(struct inode *);
/*================ Global variables ================*/
struct file_operations hfs_file_operations = {
llseek: generic_file_llseek,
read: hfs_file_read,
write: hfs_file_write,
mmap: generic_file_mmap,
fsync: file_fsync,
.llseek = generic_file_llseek,
.read = hfs_file_read,
.write = hfs_file_write,
.mmap = generic_file_mmap,
.fsync = file_fsync,
};
struct inode_operations hfs_file_inode_operations = {
truncate: hfs_file_truncate,
setattr: hfs_notify_change,
.truncate = hfs_file_truncate,
.setattr = hfs_notify_change,
};
/*================ Variable-like macros ================*/
......
......@@ -47,14 +47,14 @@ static hfs_rwret_t cap_info_write(struct file *, const char *,
/*================ Global variables ================*/
struct file_operations hfs_cap_info_operations = {
llseek: cap_info_llseek,
read: cap_info_read,
write: cap_info_write,
fsync: file_fsync,
.llseek = cap_info_llseek,
.read = cap_info_read,
.write = cap_info_write,
.fsync = file_fsync,
};
struct inode_operations hfs_cap_info_inode_operations = {
setattr: hfs_notify_change_cap,
.setattr = hfs_notify_change_cap,
};
/*================ File-local functions ================*/
......
......@@ -47,20 +47,20 @@ static hfs_rwret_t hdr_write(struct file *, const char *,
/*================ Global variables ================*/
struct file_operations hfs_hdr_operations = {
llseek: hdr_llseek,
read: hdr_read,
write: hdr_write,
fsync: file_fsync,
.llseek = hdr_llseek,
.read = hdr_read,
.write = hdr_write,
.fsync = file_fsync,
};
struct inode_operations hfs_hdr_inode_operations = {
setattr: hfs_notify_change_hdr,
.setattr = hfs_notify_change_hdr,
};
const struct hfs_hdr_layout hfs_dbl_fil_hdr_layout = {
magic: __constant_htonl(HFS_DBL_MAGIC), /* magic */
version: __constant_htonl(HFS_HDR_VERSION_2), /* version */
entries: 6, /* entries */
.magic = __constant_htonl(HFS_DBL_MAGIC), /* magic */
.version = __constant_htonl(HFS_HDR_VERSION_2), /* version */
.entries = 6, /* entries */
{ /* descr[] */
{HFS_HDR_FNAME, offsetof(struct hfs_dbl_hdr, real_name), ~0},
{HFS_HDR_DATES, offsetof(struct hfs_dbl_hdr, create_time), 16},
......@@ -80,9 +80,9 @@ const struct hfs_hdr_layout hfs_dbl_fil_hdr_layout = {
};
const struct hfs_hdr_layout hfs_dbl_dir_hdr_layout = {
magic: __constant_htonl(HFS_DBL_MAGIC), /* magic */
version: __constant_htonl(HFS_HDR_VERSION_2), /* version */
entries: 5, /* entries */
.magic = __constant_htonl(HFS_DBL_MAGIC), /* magic */
.version = __constant_htonl(HFS_HDR_VERSION_2), /* version */
.entries = 5, /* entries */
{ /* descr[] */
{HFS_HDR_FNAME, offsetof(struct hfs_dbl_hdr, real_name), ~0},
{HFS_HDR_DATES, offsetof(struct hfs_dbl_hdr, create_time), 16},
......@@ -100,9 +100,9 @@ const struct hfs_hdr_layout hfs_dbl_dir_hdr_layout = {
};
const struct hfs_hdr_layout hfs_nat2_hdr_layout = {
magic: __constant_htonl(HFS_DBL_MAGIC), /* magic */
version: __constant_htonl(HFS_HDR_VERSION_2), /* version */
entries: 9, /* entries */
.magic = __constant_htonl(HFS_DBL_MAGIC), /* magic */
.version = __constant_htonl(HFS_HDR_VERSION_2), /* version */
.entries = 9, /* entries */
{ /* descr[] */
{HFS_HDR_FNAME, offsetof(struct hfs_dbl_hdr, real_name), ~0},
{HFS_HDR_COMNT, offsetof(struct hfs_dbl_hdr, comment), 0},
......@@ -128,9 +128,9 @@ const struct hfs_hdr_layout hfs_nat2_hdr_layout = {
};
const struct hfs_hdr_layout hfs_nat_hdr_layout = {
magic: __constant_htonl(HFS_DBL_MAGIC), /* magic */
version: __constant_htonl(HFS_HDR_VERSION_1), /* version */
entries: 5, /* entries */
.magic = __constant_htonl(HFS_DBL_MAGIC), /* magic */
.version = __constant_htonl(HFS_HDR_VERSION_1), /* version */
.entries = 5, /* entries */
{ /* descr[] */
{HFS_HDR_FNAME, offsetof(struct hfs_dbl_hdr, real_name), ~0},
{HFS_HDR_COMNT, offsetof(struct hfs_dbl_hdr, comment), 0},
......
......@@ -247,12 +247,12 @@ static int hfs_bmap(struct address_space *mapping, long block)
return generic_block_bmap(mapping,block,hfs_get_block);
}
struct address_space_operations hfs_aops = {
readpage: hfs_readpage,
writepage: hfs_writepage,
sync_page: block_sync_page,
prepare_write: hfs_prepare_write,
commit_write: generic_commit_write,
bmap: hfs_bmap
.readpage = hfs_readpage,
.writepage = hfs_writepage,
.sync_page = block_sync_page,
.prepare_write = hfs_prepare_write,
.commit_write = generic_commit_write,
.bmap = hfs_bmap
};
/*
......
......@@ -87,13 +87,13 @@ static void destroy_inodecache(void)
/*================ Global variables ================*/
static struct super_operations hfs_super_operations = {
alloc_inode: hfs_alloc_inode,
destroy_inode: hfs_destroy_inode,
read_inode: hfs_read_inode,
put_inode: hfs_put_inode,
put_super: hfs_put_super,
write_super: hfs_write_super,
statfs: hfs_statfs,
.alloc_inode = hfs_alloc_inode,
.destroy_inode = hfs_destroy_inode,
.read_inode = hfs_read_inode,
.put_inode = hfs_put_inode,
.put_super = hfs_put_super,
.write_super = hfs_write_super,
.statfs = hfs_statfs,
};
/*================ File-local variables ================*/
......@@ -105,11 +105,11 @@ static struct super_block *hfs_get_sb(struct file_system_type *fs_type,
}
static struct file_system_type hfs_fs = {
owner: THIS_MODULE,
name: "hfs",
get_sb: hfs_get_sb,
kill_sb: kill_block_super,
fs_flags: FS_REQUIRES_DEV,
.owner = THIS_MODULE,
.name = "hfs",
.get_sb = hfs_get_sb,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
/*================ File-local functions ================*/
......
......@@ -25,10 +25,10 @@ static int hfs_compare_dentry(struct dentry *, struct qstr *, struct qstr *);
static void hfs_dentry_iput(struct dentry *, struct inode *);
struct dentry_operations hfs_dentry_operations =
{
d_revalidate: hfs_revalidate_dentry,
d_hash: hfs_hash_dentry,
d_compare: hfs_compare_dentry,
d_iput: hfs_dentry_iput,
.d_revalidate = hfs_revalidate_dentry,
.d_hash = hfs_hash_dentry,
.d_compare = hfs_compare_dentry,
.d_iput = hfs_dentry_iput,
};
/*
......
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