From: Art Haas <ahaas@neosoft.com>
To: linux-kernel@vger.kernel.org
Subject: C99 designated initializers for fs/ufs
Date: Sat, 28 Sep 2002 13:04:30 -0500 [thread overview]
Message-ID: <20020928180430.GH22783@debian> (raw)
Hi.
Here's a set of patches for converting fs/ufs to use C99 initializers.
The patches are against 2.5.39.
Art Haas
--- linux-2.5.39/fs/ufs/dir.c.old 2002-08-27 19:11:04.000000000 -0500
+++ linux-2.5.39/fs/ufs/dir.c 2002-09-28 10:37:19.000000000 -0500
@@ -623,7 +623,7 @@
}
struct file_operations ufs_dir_operations = {
- read: generic_read_dir,
- readdir: ufs_readdir,
- fsync: file_fsync,
+ .read = generic_read_dir,
+ .readdir = ufs_readdir,
+ .fsync = file_fsync,
};
--- linux-2.5.39/fs/ufs/file.c.old 2002-08-02 08:16:30.000000000 -0500
+++ linux-2.5.39/fs/ufs/file.c 2002-09-28 10:37:19.000000000 -0500
@@ -42,14 +42,14 @@
*/
struct file_operations ufs_file_operations = {
- llseek: generic_file_llseek,
- read: generic_file_read,
- write: generic_file_write,
- mmap: generic_file_mmap,
- open: generic_file_open,
- sendfile: generic_file_sendfile,
+ .llseek = generic_file_llseek,
+ .read = generic_file_read,
+ .write = generic_file_write,
+ .mmap = generic_file_mmap,
+ .open = generic_file_open,
+ .sendfile = generic_file_sendfile,
};
struct inode_operations ufs_file_inode_operations = {
- truncate: ufs_truncate,
+ .truncate = ufs_truncate,
};
--- linux-2.5.39/fs/ufs/inode.c.old 2002-08-27 19:11:04.000000000 -0500
+++ linux-2.5.39/fs/ufs/inode.c 2002-09-28 10:37:19.000000000 -0500
@@ -462,12 +462,12 @@
return generic_block_bmap(mapping,block,ufs_getfrag_block);
}
struct address_space_operations ufs_aops = {
- readpage: ufs_readpage,
- writepage: ufs_writepage,
- sync_page: block_sync_page,
- prepare_write: ufs_prepare_write,
- commit_write: generic_commit_write,
- bmap: ufs_bmap
+ .readpage = ufs_readpage,
+ .writepage = ufs_writepage,
+ .sync_page = block_sync_page,
+ .prepare_write = ufs_prepare_write,
+ .commit_write = generic_commit_write,
+ .bmap = ufs_bmap
};
void ufs_read_inode (struct inode * inode)
--- linux-2.5.39/fs/ufs/namei.c.old 2002-08-27 19:11:04.000000000 -0500
+++ linux-2.5.39/fs/ufs/namei.c 2002-09-28 10:37:19.000000000 -0500
@@ -350,13 +350,13 @@
}
struct inode_operations ufs_dir_inode_operations = {
- create: ufs_create,
- lookup: ufs_lookup,
- link: ufs_link,
- unlink: ufs_unlink,
- symlink: ufs_symlink,
- mkdir: ufs_mkdir,
- rmdir: ufs_rmdir,
- mknod: ufs_mknod,
- rename: ufs_rename,
+ .create = ufs_create,
+ .lookup = ufs_lookup,
+ .link = ufs_link,
+ .unlink = ufs_unlink,
+ .symlink = ufs_symlink,
+ .mkdir = ufs_mkdir,
+ .rmdir = ufs_rmdir,
+ .mknod = ufs_mknod,
+ .rename = ufs_rename,
};
--- linux-2.5.39/fs/ufs/super.c.old 2002-09-16 09:34:08.000000000 -0500
+++ linux-2.5.39/fs/ufs/super.c 2002-09-28 10:37:18.000000000 -0500
@@ -1041,15 +1041,15 @@
}
static struct super_operations ufs_super_ops = {
- alloc_inode: ufs_alloc_inode,
- destroy_inode: ufs_destroy_inode,
- read_inode: ufs_read_inode,
- write_inode: ufs_write_inode,
- delete_inode: ufs_delete_inode,
- put_super: ufs_put_super,
- write_super: ufs_write_super,
- statfs: ufs_statfs,
- remount_fs: ufs_remount,
+ .alloc_inode = ufs_alloc_inode,
+ .destroy_inode = ufs_destroy_inode,
+ .read_inode = ufs_read_inode,
+ .write_inode = ufs_write_inode,
+ .delete_inode = ufs_delete_inode,
+ .put_super = ufs_put_super,
+ .write_super = ufs_write_super,
+ .statfs = ufs_statfs,
+ .remount_fs = ufs_remount,
};
static struct super_block *ufs_get_sb(struct file_system_type *fs_type,
@@ -1059,11 +1059,11 @@
}
static struct file_system_type ufs_fs_type = {
- owner: THIS_MODULE,
- name: "ufs",
- get_sb: ufs_get_sb,
- kill_sb: kill_block_super,
- fs_flags: FS_REQUIRES_DEV,
+ .owner = THIS_MODULE,
+ .name = "ufs",
+ .get_sb = ufs_get_sb,
+ .kill_sb = kill_block_super,
+ .fs_flags = FS_REQUIRES_DEV,
};
static int __init init_ufs_fs(void)
--- linux-2.5.39/fs/ufs/symlink.c.old 2002-07-05 18:42:18.000000000 -0500
+++ linux-2.5.39/fs/ufs/symlink.c 2002-09-28 10:37:19.000000000 -0500
@@ -41,6 +41,6 @@
}
struct inode_operations ufs_fast_symlink_inode_operations = {
- readlink: ufs_readlink,
- follow_link: ufs_follow_link,
+ .readlink = ufs_readlink,
+ .follow_link = ufs_follow_link,
};
--
They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety.
-- Benjamin Franklin, Historical Review of Pennsylvania, 1759
reply other threads:[~2002-09-28 17:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020928180430.GH22783@debian \
--to=ahaas@neosoft.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.