OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [linux/] [affs_fs.h] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
#ifndef _AFFS_FS_H
2
#define _AFFS_FS_H
3
/*
4
 * The affs filesystem constants/structures
5
 */
6
 
7
#include <linux/types.h>
8
 
9
#define AFFS_SUPER_MAGIC 0xadff
10
 
11
/* Get the filesystem block size given an inode. */
12
#define AFFS_I2BSIZE(inode) ((inode)->i_sb->s_blocksize)
13
 
14
/* Get the filesystem hash table size given an inode. */
15
#define AFFS_I2HSIZE(inode) ((inode)->i_sb->u.affs_sb.s_hashsize)
16
 
17
/* Get the block number bits given an inode */
18
#define AFFS_I2BITS(inode) ((inode)->i_sb->s_blocksize_bits)
19
 
20
/* Get the fs type given an inode */
21
#define AFFS_I2FSTYPE(inode) ((inode)->i_sb->u.affs_sb.s_flags & SF_INTL)
22
 
23
struct DateStamp
24
{
25
  __u32 ds_Days;
26
  __u32 ds_Minute;
27
  __u32 ds_Tick;
28
};
29
 
30
 
31
/* --- Prototypes ----------------------------------------------------------------------------- */
32
 
33
/* amigaffs.c */
34
 
35
extern int                 affs_get_key_entry(int bsize, void *data, int entry_pos);
36
extern int                 affs_find_next_hash_entry(int bsize, void *dir_data, int *hash_pos);
37
extern int                 affs_get_file_name(int bsize, void *fh_data, char **name);
38
extern unsigned int        affs_checksum_block(int bsize, void *data, int *ptype, int *stype);
39
extern void                affs_fix_checksum(int bsize, void *data, int cspos);
40
extern void                secs_to_datestamp(int secs, struct DateStamp *ds);
41
extern int                 prot_to_mode(unsigned int prot);
42
extern unsigned int        mode_to_prot(int mode);
43
extern int                 affs_fix_hash_pred(struct inode *startino, int startoffset,
44
                                              int key, int newkey);
45
extern int                 affs_fix_link_pred(struct inode *startino, int key, int newkey);
46
 
47
/* bitmap. c */
48
 
49
extern int                 affs_count_free_blocks(struct super_block *s);
50
extern int                 affs_count_free_bits(int blocksize, const char *data);
51
extern void                affs_free_block(struct super_block *sb, int block);
52
extern int                 affs_new_header(struct inode *inode);
53
extern int                 affs_new_data(struct inode *inode);
54
extern void                affs_make_zones(struct super_block *sb);
55
 
56
/* namei.c */
57
 
58
extern int                 affs_hash_name(const char *name, int len, int intl, int hashsize);
59
extern int                 affs_lookup(struct inode *dir,const char *name, int len,
60
                                       struct inode **result);
61
extern int                 affs_unlink(struct inode *dir, const char *name, int len);
62
extern int                 affs_create(struct inode *dir, const char *name, int len, int mode,
63
                                       struct inode **result);
64
extern int                 affs_mkdir(struct inode *dir, const char *name, int len, int mode);
65
extern int                 affs_rmdir(struct inode *dir, const char *name, int len);
66
extern int                 affs_link(struct inode *oldinode, struct inode *dir,
67
                                     const char *name, int len);
68
extern int                 affs_symlink(struct inode *dir, const char *name, int len,
69
                                        const char *symname);
70
extern int                 affs_fixup(struct buffer_head *bh, struct inode *inode);
71
extern int                 affs_rename(struct inode *old_dir, const char *old_name, int old_len,
72
                                       struct inode *new_dir, const char *new_name, int new_len,
73
                                       int must_be_dir);
74
 
75
/* inode.c */
76
 
77
extern struct buffer_head *affs_bread(kdev_t dev, int block, int size);
78
extern void                affs_brelse(struct buffer_head *buf);
79
extern void                affs_put_super(struct super_block *);
80
extern int                 affs_parent_ino(struct inode *dir);
81
extern struct super_block *affs_read_super(struct super_block *,void *, int);
82
extern void                affs_statfs(struct super_block *, struct statfs *, int bufsiz);
83
extern void                affs_read_inode(struct inode *);
84
extern void                affs_write_inode(struct inode *);
85
extern int                 affs_notify_change(struct inode *inode, struct iattr *attr);
86
extern void                affs_put_inode(struct inode *);
87
extern struct inode       *affs_new_inode(const struct inode *dir);
88
extern int                 affs_add_entry(struct inode *dir, struct inode *link, struct inode *inode,
89
                                          const char *name, int len, int type);
90
 
91
/* file.c */
92
 
93
extern int                 affs_bmap(struct inode *inode, int block);
94
extern struct buffer_head *affs_getblock(struct inode *inode, int block);
95
extern void                affs_truncate(struct inode *);
96
extern void                affs_truncate_ofs(struct inode *);
97
 
98
/* dir.c */
99
 
100
extern void                affs_dir_truncate(struct inode *);
101
 
102
/* jump tables */
103
 
104
extern struct inode_operations   affs_file_inode_operations;
105
extern struct inode_operations   affs_file_inode_operations_ofs;
106
extern struct inode_operations   affs_dir_inode_operations;
107
extern struct inode_operations   affs_symlink_inode_operations;
108
extern struct inode_operations   affs_chrdev_inode_operations;
109
extern struct inode_operations   affs_blkdev_inode_operations;
110
 
111
extern int init_affs_fs(void);
112
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.