mtd/fs/jffs2/ecos/src dir-ecos.c,1.4,1.5 file-ecos.c,1.7,1.8
fs-ecos.c,1.12,1.13 jffs2port.h,1.5,1.6 os-ecos.h,1.9,1.10
David Woodhouse
dwmw2 at infradead.org
Mon Nov 24 08:49:40 EST 2003
Update of /home/cvs/mtd/fs/jffs2/ecos/src
In directory phoenix.infradead.org:/tmp/cvs-serv1112
Modified Files:
dir-ecos.c file-ecos.c fs-ecos.c jffs2port.h os-ecos.h
Log Message:
Rename struct inode to underline the fact that it's nothing to do with the Linux one
Index: dir-ecos.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/ecos/src/dir-ecos.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- dir-ecos.c 20 Nov 2003 16:41:58 -0000 1.4
+++ dir-ecos.c 24 Nov 2003 13:49:38 -0000 1.5
@@ -22,13 +22,13 @@
and we use the same hash function as the dentries. Makes this
nice and simple
*/
-struct inode *jffs2_lookup(struct inode *dir_i, struct qstr *d_name)
+struct _inode *jffs2_lookup(struct _inode *dir_i, struct qstr *d_name)
{
struct jffs2_inode_info *dir_f;
struct jffs2_sb_info *c;
struct jffs2_full_dirent *fd = NULL, *fd_list;
uint32_t ino = 0;
- struct inode *inode = NULL;
+ struct _inode *inode = NULL;
D1(printk("jffs2_lookup()\n"));
@@ -64,13 +64,13 @@
-int jffs2_create(struct inode *dir_i, struct qstr *d_name, int mode,
- struct inode **new_i)
+int jffs2_create(struct _inode *dir_i, struct qstr *d_name, int mode,
+ struct _inode **new_i)
{
struct jffs2_raw_inode *ri;
struct jffs2_inode_info *f, *dir_f;
struct jffs2_sb_info *c;
- struct inode *inode;
+ struct _inode *inode;
int ret;
ri = jffs2_alloc_raw_inode();
@@ -114,7 +114,7 @@
/***********************************************************************/
-int jffs2_unlink(struct inode *dir_i, struct inode *d_inode, struct qstr *d_name)
+int jffs2_unlink(struct _inode *dir_i, struct _inode *d_inode, struct qstr *d_name)
{
struct jffs2_sb_info *c = JFFS2_SB_INFO(dir_i->i_sb);
struct jffs2_inode_info *dir_f = JFFS2_INODE_INFO(dir_i);
@@ -130,7 +130,7 @@
/***********************************************************************/
-int jffs2_link (struct inode *old_d_inode, struct inode *dir_i, struct qstr *d_name)
+int jffs2_link (struct _inode *old_d_inode, struct _inode *dir_i, struct qstr *d_name)
{
struct jffs2_sb_info *c = JFFS2_SB_INFO(old_d_inode->i_sb);
struct jffs2_inode_info *f = JFFS2_INODE_INFO(old_d_inode);
@@ -151,11 +151,11 @@
return ret;
}
-int jffs2_mkdir (struct inode *dir_i, struct qstr *d_name, int mode, struct inode **new_i)
+int jffs2_mkdir (struct _inode *dir_i, struct qstr *d_name, int mode, struct _inode **new_i)
{
struct jffs2_inode_info *f, *dir_f;
struct jffs2_sb_info *c;
- struct inode *inode;
+ struct _inode *inode;
struct jffs2_raw_inode *ri;
struct jffs2_raw_dirent *rd;
struct jffs2_full_dnode *fn;
@@ -268,7 +268,7 @@
return 0;
}
-int jffs2_rmdir (struct inode *dir_i, struct inode *d_inode, struct qstr *d_name)
+int jffs2_rmdir (struct _inode *dir_i, struct _inode *d_inode, struct qstr *d_name)
{
struct jffs2_inode_info *f = JFFS2_INODE_INFO(d_inode);
struct jffs2_full_dirent *fd;
@@ -280,8 +280,8 @@
return jffs2_unlink(dir_i, d_inode, d_name);
}
-int jffs2_rename (struct inode *old_dir_i, struct inode *d_inode, struct qstr *old_d_name,
- struct inode *new_dir_i, struct qstr *new_d_name)
+int jffs2_rename (struct _inode *old_dir_i, struct _inode *d_inode, struct qstr *old_d_name,
+ struct _inode *new_dir_i, struct qstr *new_d_name)
{
int ret;
struct jffs2_sb_info *c = JFFS2_SB_INFO(old_dir_i->i_sb);
Index: file-ecos.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/ecos/src/file-ecos.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- file-ecos.c 24 Nov 2003 13:43:58 -0000 1.7
+++ file-ecos.c 24 Nov 2003 13:49:38 -0000 1.8
@@ -16,7 +16,7 @@
#include <linux/crc32.h>
#include "nodelist.h"
-int jffs2_do_readpage_nolock (struct inode *inode, struct page *pg)
+int jffs2_do_readpage_nolock (struct _inode *inode, struct page *pg)
{
struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode);
struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb);
@@ -47,7 +47,7 @@
return 0;
}
-int jffs2_do_readpage_unlock(struct inode *inode, struct page *pg)
+int jffs2_do_readpage_unlock(struct _inode *inode, struct page *pg)
{
int ret = jffs2_do_readpage_nolock(inode, pg);
UnlockPage(pg);
@@ -56,9 +56,9 @@
//int jffs2_prepare_write (struct file *filp, struct page *pg, unsigned start, unsigned end)
-int jffs2_prepare_write (struct inode *d_inode, struct page *pg, unsigned start, unsigned end)
+int jffs2_prepare_write (struct _inode *d_inode, struct page *pg, unsigned start, unsigned end)
{
- struct inode *inode = d_inode;
+ struct _inode *inode = d_inode;
struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode);
uint32_t pageofs = pg->index << PAGE_CACHE_SHIFT;
int ret = 0;
@@ -139,12 +139,12 @@
}
//int jffs2_commit_write (struct file *filp, struct page *pg, unsigned start, unsigned end)
-int jffs2_commit_write (struct inode *d_inode, struct page *pg, unsigned start, unsigned end)
+int jffs2_commit_write (struct _inode *d_inode, struct page *pg, unsigned start, unsigned end)
{
/* Actually commit the write from the page cache page we're looking at.
* For now, we write the full page out each time. It sucks, but it's simple
*/
- struct inode *inode = d_inode;
+ struct _inode *inode = d_inode;
struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode);
struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb);
struct jffs2_raw_inode *ri;
Index: fs-ecos.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/ecos/src/fs-ecos.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- fs-ecos.c 24 Nov 2003 13:43:58 -0000 1.12
+++ fs-ecos.c 24 Nov 2003 13:49:38 -0000 1.13
@@ -80,7 +80,7 @@
static int jffs2_fo_dirlseek(struct CYG_FILE_TAG *fp, off_t * pos, int whence);
-static int jffs2_read_inode (struct inode *inode);
+static int jffs2_read_inode (struct _inode *inode);
//==========================================================================
// Filesystem table entries
@@ -150,9 +150,9 @@
// Directory operations
struct jffs2_dirsearch {
- struct inode *dir; // directory to search
+ struct _inode *dir; // directory to search
const char *path; // path to follow
- struct inode *node; // Node found
+ struct _inode *node; // Node found
const char *name; // last name fragment used
int namelen; // name fragment length
cyg_bool last; // last name in path?
@@ -166,10 +166,10 @@
// FIXME: This seems like real cruft. Wouldn't it be better just to do the
// right thing?
-static void icache_evict(struct inode *root_i, struct inode *i)
+static void icache_evict(struct _inode *root_i, struct _inode *i)
{
- struct inode *cached_inode;
- struct inode *next_inode;
+ struct _inode *cached_inode;
+ struct _inode *next_inode;
D2(printf("icache_evict\n"));
// If this is an absolute search path from the root,
@@ -201,7 +201,7 @@
// Initialize a dirsearch object to start a search
static void init_dirsearch(jffs2_dirsearch * ds,
- struct inode *dir, const char *name)
+ struct _inode *dir, const char *name)
{
D2(printf("init_dirsearch name = %s\n", name));
D2(printf("init_dirsearch dir = %x\n", dir));
@@ -228,11 +228,11 @@
unsigned int c;
const char *hashname;
- struct inode *dir = ds->dir;
+ struct _inode *dir = ds->dir;
const char *name = ds->path;
const char *n = name;
char namelen = 0;
- struct inode *d;
+ struct _inode *d;
D2(printf("find_entry\n"));
@@ -349,7 +349,7 @@
// Pathconf support
// This function provides support for pathconf() and fpathconf().
-static int jffs2_pathconf(struct inode *node, struct cyg_pathconf_info *info)
+static int jffs2_pathconf(struct _inode *node, struct cyg_pathconf_info *info)
{
int err = ENOERR;
D2(printf("jffs2_pathconf\n"));
@@ -571,7 +571,7 @@
static int jffs2_umount(cyg_mtab_entry * mte)
{
- struct inode *root = (struct inode *) mte->root;
+ struct _inode *root = (struct _inode *) mte->root;
struct super_block *jffs2_sb = root->i_sb;
struct jffs2_sb_info *c = JFFS2_SB_INFO(jffs2_sb);
@@ -581,7 +581,7 @@
if (jffs2_sb->s_mount_count == 1) {
if (root->i_cache_next != NULL) {
- struct inode *inode = root->i_cache_next;
+ struct _inode *inode = root->i_cache_next;
printf("Refuse to unmount.\n");
while (inode) {
printf("Ino #%u has use count %d\n",
@@ -624,14 +624,14 @@
{
jffs2_dirsearch ds;
- struct inode *node = NULL;
+ struct _inode *node = NULL;
int err;
D2(printf("jffs2_open\n"));
- icache_evict((struct inode *) mte->root, (struct inode *) dir);
+ icache_evict((struct _inode *) mte->root, (struct _inode *) dir);
- init_dirsearch(&ds, (struct inode *) dir, name);
+ init_dirsearch(&ds, (struct _inode *) dir, name);
err = jffs2_find(&ds);
@@ -728,9 +728,9 @@
D2(printf("jffs2_ops_unlink\n"));
- icache_evict((struct inode *) mte->root, (struct inode *) dir);
+ icache_evict((struct _inode *) mte->root, (struct _inode *) dir);
- init_dirsearch(&ds, (struct inode *) dir, name);
+ init_dirsearch(&ds, (struct _inode *) dir, name);
err = jffs2_find(&ds);
@@ -775,14 +775,14 @@
static int jffs2_ops_mkdir(cyg_mtab_entry * mte, cyg_dir dir, const char *name)
{
jffs2_dirsearch ds;
- struct inode *node = NULL;
+ struct _inode *node = NULL;
int err;
D2(printf("jffs2_ops_mkdir\n"));
- icache_evict((struct inode *) mte->root, (struct inode *) dir);
+ icache_evict((struct _inode *) mte->root, (struct _inode *) dir);
- init_dirsearch(&ds, (struct inode *) dir, name);
+ init_dirsearch(&ds, (struct _inode *) dir, name);
err = jffs2_find(&ds);
@@ -838,9 +838,9 @@
D2(printf("jffs2_ops_rmdir\n"));
- icache_evict((struct inode *) mte->root, (struct inode *) dir);
+ icache_evict((struct _inode *) mte->root, (struct _inode *) dir);
- init_dirsearch(&ds, (struct inode *) dir, name);
+ init_dirsearch(&ds, (struct _inode *) dir, name);
err = jffs2_find(&ds);
@@ -893,7 +893,7 @@
D2(printf("jffs2_ops_rename\n"));
- init_dirsearch(&ds1, (struct inode *) dir1, name1);
+ init_dirsearch(&ds1, (struct _inode *) dir1, name1);
err = jffs2_find(&ds1);
@@ -902,7 +902,7 @@
return err;
}
- init_dirsearch(&ds2, (struct inode *) dir2, name2);
+ init_dirsearch(&ds2, (struct _inode *) dir2, name2);
err = jffs2_find(&ds2);
@@ -1014,7 +1014,7 @@
if (type != CYG_FSLINK_HARD)
return EINVAL;
- init_dirsearch(&ds1, (struct inode *) dir1, name1);
+ init_dirsearch(&ds1, (struct _inode *) dir1, name1);
err = jffs2_find(&ds1);
@@ -1023,7 +1023,7 @@
return err;
}
- init_dirsearch(&ds2, (struct inode *) dir2, name2);
+ init_dirsearch(&ds2, (struct _inode *) dir2, name2);
err = jffs2_find(&ds2);
@@ -1091,9 +1091,9 @@
D2(printf("jffs2_opendir\n"));
- icache_evict((struct inode *) mte->root, (struct inode *) dir);
+ icache_evict((struct _inode *) mte->root, (struct _inode *) dir);
- init_dirsearch(&ds, (struct inode *) dir, name);
+ init_dirsearch(&ds, (struct _inode *) dir, name);
err = jffs2_find(&ds);
@@ -1137,13 +1137,13 @@
jffs2_dirsearch ds;
int err;
- icache_evict((struct inode *) mte->root, (struct inode *) dir);
+ icache_evict((struct _inode *) mte->root, (struct _inode *) dir);
- init_dirsearch(&ds, (struct inode *) dir, name);
+ init_dirsearch(&ds, (struct _inode *) dir, name);
err = jffs2_find(&ds);
iput(ds.dir);
- iput((struct inode *)dir);
+ iput((struct _inode *)dir);
if (err != ENOERR)
return err;
@@ -1159,7 +1159,7 @@
// dir arguments are the current cdir setting and we should
// forget this fact.
- struct inode *node = (struct inode *) dir;
+ struct _inode *node = (struct _inode *) dir;
// Just decrement directory reference count.
iput(node);
@@ -1180,9 +1180,9 @@
D2(printf("jffs2_stat\n"));
- icache_evict((struct inode *) mte->root, (struct inode *) dir);
+ icache_evict((struct _inode *) mte->root, (struct _inode *) dir);
- init_dirsearch(&ds, (struct inode *) dir, name);
+ init_dirsearch(&ds, (struct _inode *) dir, name);
err = jffs2_find(&ds);
iput(ds.dir);
@@ -1219,9 +1219,9 @@
D2(printf("jffs2_getinfo\n"));
- icache_evict((struct inode *) mte->root, (struct inode *) dir);
+ icache_evict((struct _inode *) mte->root, (struct _inode *) dir);
- init_dirsearch(&ds, (struct inode *) dir, name);
+ init_dirsearch(&ds, (struct _inode *) dir, name);
err = jffs2_find(&ds);
iput(ds.dir);
@@ -1265,7 +1265,7 @@
static int jffs2_fo_read(struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio)
{
- struct inode *inode = (struct inode *) fp->f_data;
+ struct _inode *inode = (struct _inode *) fp->f_data;
struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode);
struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb);
int i;
@@ -1319,7 +1319,7 @@
{
struct page write_page;
off_t page_start_pos;
- struct inode *node = (struct inode *) fp->f_data;
+ struct _inode *node = (struct _inode *) fp->f_data;
off_t pos = fp->f_offset;
ssize_t resid = uio->uio_resid;
int i;
@@ -1417,7 +1417,7 @@
static int jffs2_fo_lseek(struct CYG_FILE_TAG *fp, off_t * apos, int whence)
{
- struct inode *node = (struct inode *) fp->f_data;
+ struct _inode *node = (struct _inode *) fp->f_data;
off_t pos = *apos;
D2(printf("jffs2_fo_lseek\n"));
@@ -1487,7 +1487,7 @@
static int jffs2_fo_close(struct CYG_FILE_TAG *fp)
{
- struct inode *node = (struct inode *) fp->f_data;
+ struct _inode *node = (struct _inode *) fp->f_data;
D2(printf("jffs2_fo_close\n"));
@@ -1504,7 +1504,7 @@
static int jffs2_fo_fstat(struct CYG_FILE_TAG *fp, struct stat *buf)
{
- struct inode *node = (struct inode *) fp->f_data;
+ struct _inode *node = (struct _inode *) fp->f_data;
D2(printf("jffs2_fo_fstat\n"));
@@ -1530,7 +1530,7 @@
static int jffs2_fo_getinfo(struct CYG_FILE_TAG *fp, int key, void *buf,
int len)
{
- struct inode *node = (struct inode *) fp->f_data;
+ struct _inode *node = (struct _inode *) fp->f_data;
int err;
D2(printf("jffs2_fo_getinfo\n"));
@@ -1578,14 +1578,14 @@
static int jffs2_fo_dirread(struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio)
{
- struct inode *d_inode = (struct inode *) fp->f_data;
+ struct _inode *d_inode = (struct _inode *) fp->f_data;
struct dirent *ent = (struct dirent *) uio->uio_iov[0].iov_base;
char *nbuf = ent->d_name;
int nlen = sizeof (ent->d_name) - 1;
off_t len = uio->uio_iov[0].iov_len;
struct jffs2_inode_info *f;
struct jffs2_sb_info *c;
- struct inode *inode = d_inode;
+ struct _inode *inode = d_inode;
struct jffs2_full_dirent *fd;
unsigned long offset, curofs;
int found = 1;
@@ -1717,7 +1717,7 @@
unsigned long offset,
unsigned long *priv)
{
- struct inode *inode = OFNI_EDONI_2SFFJ(f);
+ struct _inode *inode = OFNI_EDONI_2SFFJ(f);
struct page *pg;
pg = read_cache_page(offset >> PAGE_CACHE_SHIFT,
@@ -1739,16 +1739,16 @@
page_cache_release(pg);
}
-static struct inode *new_inode(struct super_block *sb)
+static struct _inode *new_inode(struct super_block *sb)
{
// Only called in write.c jffs2_new_inode
// Always adds itself to inode cache
- struct inode *inode;
- struct inode *cached_inode;
+ struct _inode *inode;
+ struct _inode *cached_inode;
- inode = malloc(sizeof (struct inode));
+ inode = malloc(sizeof (struct _inode));
if (inode == NULL)
return 0;
@@ -1756,7 +1756,7 @@
("malloc new_inode %x ####################################\n",
inode));
- memset(inode, 0, sizeof (struct inode));
+ memset(inode, 0, sizeof (struct _inode));
inode->i_sb = sb;
inode->i_ino = 1;
inode->i_count = 0; //1; // Let ecos manage the open count
@@ -1778,9 +1778,9 @@
return inode;
}
-struct inode *ilookup(struct super_block *sb, cyg_uint32 ino)
+struct _inode *ilookup(struct super_block *sb, cyg_uint32 ino)
{
- struct inode *inode = NULL;
+ struct _inode *inode = NULL;
D2(printf("ilookup\n"));
// Check for this inode in the cache
@@ -1794,7 +1794,7 @@
return inode;
}
-struct inode *iget(struct super_block *sb, cyg_uint32 ino)
+struct _inode *iget(struct super_block *sb, cyg_uint32 ino)
{
// Called in super.c jffs2_read_super, dir.c jffs2_lookup,
// and gc.c jffs2_garbage_collect_pass
@@ -1802,7 +1802,7 @@
// Must first check for cached inode
// If this fails let new_inode create one
- struct inode *inode;
+ struct _inode *inode;
D2(printf("iget\n"));
@@ -1829,7 +1829,7 @@
// Decrement the reference count on an inode. If this makes the ref count
// zero, then this inode can be freed.
-void iput(struct inode *i)
+void iput(struct _inode *i)
{
// Called in jffs2_find
@@ -1837,7 +1837,7 @@
// super.c jffs2_read_super,
// and gc.c jffs2_garbage_collect_pass
- struct inode *cached_inode;
+ struct _inode *cached_inode;
if (!i) {
printf("iput() called with NULL inode\n");
@@ -1875,7 +1875,7 @@
#define EIO_ERROR ((void *) (return_EIO))
-void make_bad_inode(struct inode *inode)
+void make_bad_inode(struct _inode *inode)
{
// In readinode.c JFFS2 checks whether the inode has appropriate
@@ -1889,7 +1889,7 @@
inode->i_fop = EIO_ERROR;
}
-int is_bad_inode(struct inode *inode)
+int is_bad_inode(struct _inode *inode)
{
// Called in super.c jffs2_read_super,
@@ -2049,7 +2049,7 @@
// -------------------------------------------------------------------------
// EOF jffs2.c
-void jffs2_clear_inode (struct inode *inode)
+void jffs2_clear_inode (struct _inode *inode)
{
/* We can forget about this inode for now - drop all
* the nodelists associated with it, etc.
@@ -2065,9 +2065,9 @@
/* jffs2_new_inode: allocate a new inode and inocache, add it to the hash,
fill in the raw_inode while you're at it. */
-struct inode *jffs2_new_inode (struct inode *dir_i, int mode, struct jffs2_raw_inode *ri)
+struct _inode *jffs2_new_inode (struct _inode *dir_i, int mode, struct jffs2_raw_inode *ri)
{
- struct inode *inode;
+ struct _inode *inode;
struct super_block *sb = dir_i->i_sb;
struct jffs2_sb_info *c;
struct jffs2_inode_info *f;
@@ -2109,7 +2109,7 @@
}
-static int jffs2_read_inode (struct inode *inode)
+static int jffs2_read_inode (struct _inode *inode)
{
struct jffs2_inode_info *f;
struct jffs2_sb_info *c;
@@ -2155,7 +2155,7 @@
struct jffs2_inode_info *jffs2_gc_fetch_inode(struct jffs2_sb_info *c,
int inum, int nlink)
{
- struct inode *inode;
+ struct _inode *inode;
struct jffs2_inode_cache *ic;
if (!nlink) {
/* The inode has zero nlink but its nodes weren't yet marked
Index: jffs2port.h
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/ecos/src/jffs2port.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- jffs2port.h 24 Nov 2003 13:44:43 -0000 1.5
+++ jffs2port.h 24 Nov 2003 13:49:38 -0000 1.6
@@ -51,7 +51,7 @@
struct dentry {
// atomic_t d_count;
unsigned int d_flags;
- struct inode * d_inode; /* Where the name belongs to - NULL is negative */
+ struct _inode * d_inode; /* Where the name belongs to - NULL is negative */
struct dentry * d_parent; /* parent directory */
struct list_head d_hash; /* lookup hash list */
struct list_head d_child; /* child of parent list */
@@ -115,11 +115,11 @@
//ssize_t (*write) (struct file *, const char *, size_t, loff_t *);
int (*readdir) (struct file *, char *, int);
//unsigned int (*poll) (struct file *, struct poll_table_struct *);
- int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long);
+ int (*ioctl) (struct _inode *, struct file *, unsigned int, unsigned long);
//int (*mmap) (struct file *, struct vm_area_struct *);
- //int (*open) (struct inode *, struct file *);
+ //int (*open) (struct _inode *, struct file *);
//int (*flush) (struct file *);
- //int (*release) (struct inode *, struct file *);
+ //int (*release) (struct _inode *, struct file *);
int (*fsync) (struct file *, struct dentry *, int datasync);
//int (*fasync) (int, struct file *, int);
//int (*lock) (struct file *, int, struct file_lock *);
@@ -127,21 +127,21 @@
//ssize_t (*writev) (struct file *, const struct iovec *, unsigned long, loff_t *);
};
-struct inode_operations {
- int (*create) (struct inode *,struct dentry *,int);
- struct dentry * (*lookup) (struct inode *,struct dentry *);
- int (*link) (struct dentry *,struct inode *,struct dentry *);
- int (*unlink) (struct inode *,struct dentry *);
- int (*symlink) (struct inode *,struct dentry *,const char *);
- int (*mkdir) (struct inode *,struct dentry *,int);
- int (*rmdir) (struct inode *,struct dentry *);
- int (*mknod) (struct inode *,struct dentry *,int,int);
- int (*rename) (struct inode *, struct dentry *,
- struct inode *, struct dentry *);
+struct _inode_operations {
+ int (*create) (struct _inode *,struct dentry *,int);
+ struct dentry * (*lookup) (struct _inode *,struct dentry *);
+ int (*link) (struct dentry *,struct _inode *,struct dentry *);
+ int (*unlink) (struct _inode *,struct dentry *);
+ int (*symlink) (struct _inode *,struct dentry *,const char *);
+ int (*mkdir) (struct _inode *,struct dentry *,int);
+ int (*rmdir) (struct _inode *,struct dentry *);
+ int (*mknod) (struct _inode *,struct dentry *,int,int);
+ int (*rename) (struct _inode *, struct dentry *,
+ struct _inode *, struct dentry *);
int (*readlink) (struct dentry *, char *,int);
int (*follow_link) (struct dentry *, struct nameidata *);
- //void (*truncate) (struct inode *);
- int (*permission) (struct inode *, int);
+ //void (*truncate) (struct _inode *);
+ int (*permission) (struct _inode *, int);
//int (*revalidate) (struct dentry *);
int (*setattr) (struct dentry *, struct iattr *);
//int (*getattr) (struct dentry *, struct iattr *);
@@ -169,11 +169,11 @@
#define kunmap(page) do { } while (0)
-//static struct inode * new_inode(struct super_block *sb);
-struct inode * iget(struct super_block *sb, cyg_uint32 ino);
-void iput(struct inode * i);
-void make_bad_inode(struct inode * inode);
-int is_bad_inode(struct inode * inode);
+//static struct _inode * new_inode(struct super_block *sb);
+struct _inode * iget(struct super_block *sb, cyg_uint32 ino);
+void iput(struct _inode * i);
+void make_bad_inode(struct _inode * inode);
+int is_bad_inode(struct _inode * inode);
struct jffs2_sb_info;
struct jffs2_eraseblock;
@@ -187,15 +187,15 @@
// calls to JFFS2
// dir-ecos.c
-struct inode *jffs2_lookup(struct inode *dir_i, struct qstr *name);
-int jffs2_readdir (struct inode *d_inode, unsigned long f_pos, char *nbuf, int nlen);
-int jffs2_create(struct inode *dir_i, struct qstr *d_name, int mode, struct inode **new_i);
-int jffs2_mkdir (struct inode *dir_i, struct qstr *d_name, int mode, struct inode **new_i);
-int jffs2_link (struct inode *old_d_inode, struct inode *dir_i, struct qstr *d_name);
-int jffs2_unlink(struct inode *dir_i, struct inode *d_inode, struct qstr *d_name);
-int jffs2_rmdir (struct inode *dir_i, struct inode *d_inode, struct qstr *d_name);
-int jffs2_rename (struct inode *old_dir_i, struct inode *d_inode, struct qstr *old_d_name,
- struct inode *new_dir_i, struct qstr *new_d_name);
+struct _inode *jffs2_lookup(struct _inode *dir_i, struct qstr *name);
+int jffs2_readdir (struct _inode *d_inode, unsigned long f_pos, char *nbuf, int nlen);
+int jffs2_create(struct _inode *dir_i, struct qstr *d_name, int mode, struct _inode **new_i);
+int jffs2_mkdir (struct _inode *dir_i, struct qstr *d_name, int mode, struct _inode **new_i);
+int jffs2_link (struct _inode *old_d_inode, struct _inode *dir_i, struct qstr *d_name);
+int jffs2_unlink(struct _inode *dir_i, struct _inode *d_inode, struct qstr *d_name);
+int jffs2_rmdir (struct _inode *dir_i, struct _inode *d_inode, struct qstr *d_name);
+int jffs2_rename (struct _inode *old_dir_i, struct _inode *d_inode, struct qstr *old_d_name,
+ struct _inode *new_dir_i, struct qstr *new_d_name);
#define init_name_hash() 0
static inline unsigned long partial_name_hash(unsigned long c, unsigned long prevhash)
Index: os-ecos.h
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/ecos/src/os-ecos.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- os-ecos.h 24 Nov 2003 13:43:58 -0000 1.9
+++ os-ecos.h 24 Nov 2003 13:49:38 -0000 1.10
@@ -114,7 +114,7 @@
#define jffs2_can_mark_obsolete(c) (1)
#define JFFS2_INODE_INFO(i) (&(i)->jffs2_i)
-#define OFNI_EDONI_2SFFJ(f) ((struct inode *) ( ((char *)f) - ((char *)(&((struct inode *)NULL)->jffs2_i)) ) )
+#define OFNI_EDONI_2SFFJ(f) ((struct _inode *) ( ((char *)f) - ((char *)(&((struct _inode *)NULL)->jffs2_i)) ) )
#define JFFS2_F_I_SIZE(f) (OFNI_EDONI_2SFFJ(f)->i_size)
#define JFFS2_F_I_MODE(f) (OFNI_EDONI_2SFFJ(f)->i_mode)
@@ -133,7 +133,7 @@
//#define I_SEC(x) (x)
#define get_seconds cyg_timestamp
-struct inode {
+struct _inode {
//struct list_head i_hash;
//struct list_head i_list;
struct list_head i_dentry;
@@ -155,7 +155,7 @@
//unsigned long i_version;
//struct semaphore i_sem;
//struct semaphore i_zombie;
- struct inode_operations *i_op;
+ struct _inode_operations *i_op;
struct file_operations *i_fop; // former ->i_op->default_file_ops
struct super_block *i_sb;
//wait_queue_head_t i_wait;
@@ -176,10 +176,10 @@
//uint32_t i_generation;
struct jffs2_inode_info jffs2_i;
- struct inode *i_parent;
+ struct _inode *i_parent;
- struct inode *i_cache_prev;
- struct inode *i_cache_next;
+ struct _inode *i_cache_prev;
+ struct _inode *i_cache_next;
};
#define JFFS2_SB_INFO(sb) (&(sb)->jffs2_sb)
@@ -194,7 +194,7 @@
unsigned long s_flags;
unsigned long s_magic;
//struct dentry *s_root;
- struct inode *s_root;
+ struct _inode *s_root;
struct jffs2_sb_info jffs2_sb;
unsigned long s_mount_count;
cyg_io_handle_t s_dev;
@@ -211,22 +211,22 @@
/* dir.c */
extern struct file_operations jffs2_dir_operations;
-extern struct inode_operations jffs2_dir_inode_operations;
+extern struct _inode_operations jffs2_dir_inode_operations;
/* file.c */
extern struct file_operations jffs2_file_operations;
-extern struct inode_operations jffs2_file_inode_operations;
+extern struct _inode_operations jffs2_file_inode_operations;
extern struct address_space_operations jffs2_file_address_operations;
int jffs2_null_fsync(struct file *, struct dentry *, int);
int jffs2_setattr (struct dentry *dentry, struct iattr *iattr);
-int jffs2_do_readpage_nolock (struct inode *inode, struct page *pg);
-int jffs2_do_readpage_unlock (struct inode *inode, struct page *pg);
+int jffs2_do_readpage_nolock (struct _inode *inode, struct page *pg);
+int jffs2_do_readpage_unlock (struct _inode *inode, struct page *pg);
//int jffs2_readpage (struct file *, struct page *);
-int jffs2_readpage (struct inode *d_inode, struct page *pg);
+int jffs2_readpage (struct _inode *d_inode, struct page *pg);
//int jffs2_prepare_write (struct file *, struct page *, unsigned, unsigned);
-int jffs2_prepare_write (struct inode *d_inode, struct page *pg, unsigned start, unsigned end);
+int jffs2_prepare_write (struct _inode *d_inode, struct page *pg, unsigned start, unsigned end);
//int jffs2_commit_write (struct file *, struct page *, unsigned, unsigned);
-int jffs2_commit_write (struct inode *d_inode, struct page *pg, unsigned start, unsigned end);
+int jffs2_commit_write (struct _inode *d_inode, struct page *pg, unsigned start, unsigned end);
/* fs.c */
void jffs2_gc_release_inode(struct jffs2_sb_info *c,
@@ -261,8 +261,8 @@
#else
#error no nand yet
#endif
-struct inode *jffs2_new_inode (struct inode *dir_i, int mode, struct jffs2_raw_inode *ri);
-void jffs2_clear_inode (struct inode *inode);
+struct _inode *jffs2_new_inode (struct _inode *dir_i, int mode, struct jffs2_raw_inode *ri);
+void jffs2_clear_inode (struct _inode *inode);
static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
{
More information about the linux-mtd-cvs
mailing list