~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/fs/udf/udfdecl.h

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef __UDF_DECL_H
  2 #define __UDF_DECL_H
  3 
  4 #include <linux/udf_167.h>
  5 #include <linux/udf_udf.h>
  6 #include "udfend.h"
  7 
  8 #include <linux/udf_fs.h>
  9 
 10 #ifdef __KERNEL__
 11 
 12 #include <linux/config.h>
 13 #include <linux/types.h>
 14 
 15 #ifndef LINUX_VERSION_CODE
 16 #include <linux/version.h>
 17 #endif
 18 
 19 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,7)
 20 #error "The UDF Module Current Requires Kernel Version 2.3.7 or greater"
 21 #endif
 22 
 23 #include <linux/fs.h>
 24 
 25 #if !defined(CONFIG_UDF_FS) && !defined(CONFIG_UDF_FS_MODULE)
 26 #define CONFIG_UDF_FS_MODULE
 27 #include <linux/udf_fs_sb.h>
 28 #include <linux/udf_fs_i.h>
 29 #endif
 30 
 31 #define udf_fixed_to_variable(x) ( ( ( (x) >> 5 ) * 39 ) + ( (x) & 0x0000001F ) )
 32 #define udf_variable_to_fixed(x) ( ( ( (x) / 39 ) << 5 ) + ( (x) % 39 ) )
 33 
 34 #define CURRENT_UTIME   (xtime.tv_usec)
 35 
 36 #define udf_file_entry_alloc_offset(inode)\
 37         ((UDF_I_EXTENDED_FE(inode) ?\
 38                 sizeof(struct ExtendedFileEntry) :\
 39                 sizeof(struct FileEntry)) + UDF_I_LENEATTR(inode))
 40 
 41 #define udf_ext0_offset(inode)\
 42         (UDF_I_ALLOCTYPE(inode) == ICB_FLAG_AD_IN_ICB ?\
 43                 udf_file_entry_alloc_offset(inode) : 0)
 44 
 45 #define udf_get_lb_pblock(sb,loc,offset) udf_get_pblock((sb), (loc).logicalBlockNum, (loc).partitionReferenceNum, (offset))
 46 
 47 #else
 48 
 49 #include <sys/types.h>
 50 
 51 #endif /* __KERNEL__ */
 52 
 53 
 54 
 55 #ifdef __KERNEL__
 56 
 57 struct dentry;
 58 struct inode;
 59 struct task_struct;
 60 struct buffer_head;
 61 struct super_block;
 62 
 63 extern struct inode_operations udf_dir_inode_operations;
 64 extern struct file_operations udf_dir_operations;
 65 extern struct inode_operations udf_file_inode_operations;
 66 extern struct file_operations udf_file_operations;
 67 extern struct address_space_operations udf_aops;
 68 extern struct address_space_operations udf_adinicb_aops;
 69 extern struct address_space_operations udf_symlink_aops;
 70 
 71 struct udf_fileident_bh
 72 {
 73         struct buffer_head *sbh;
 74         struct buffer_head *ebh;
 75         int soffset;
 76         int eoffset;
 77 };
 78 
 79 #endif /* __KERNEL__ */
 80 
 81 struct udf_directory_record
 82 {
 83         Uint32  d_parent;
 84         Uint32  d_inode;
 85         Uint32  d_name[255];
 86 };
 87 
 88 
 89 struct udf_vds_record
 90 {
 91         Uint32 block;
 92         Uint32 volDescSeqNum;
 93 };
 94 
 95 struct ktm
 96 {
 97         int tm_sec;
 98         int tm_min;
 99         int tm_hour;
100         int tm_mday;
101         int tm_mon;
102         int tm_year;
103         int tm_isdst;
104 };
105 
106 struct ustr
107 {
108         Uint8 u_cmpID;
109         Uint8 u_name[UDF_NAME_LEN];
110         Uint8 u_len;
111         Uint8 padding;
112         unsigned long u_hash;
113 };
114 
115 #ifdef __KERNEL__
116 
117 /* super.c */
118 extern void udf_error(struct super_block *, const char *, const char *, ...);
119 extern void udf_warning(struct super_block *, const char *, const char *, ...);
120 
121 /* namei.c */
122 extern int udf_write_fi(struct FileIdentDesc *, struct FileIdentDesc *, struct udf_fileident_bh *, Uint8 *, Uint8 *);
123 
124 /* file.c */
125 extern int udf_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
126 
127 /* inode.c */
128 extern struct inode *udf_iget(struct super_block *, lb_addr);
129 extern int udf_sync_inode(struct inode *);
130 extern void udf_expand_file_adinicb(struct inode *, int, int *);
131 extern struct buffer_head * udf_expand_dir_adinicb(struct inode *, int *, int *);
132 extern struct buffer_head * udf_getblk(struct inode *, long, int, int *);
133 extern struct buffer_head * udf_bread(struct inode *, int, int, int *);
134 extern void udf_read_inode(struct inode *);
135 extern void udf_put_inode(struct inode *);
136 extern void udf_delete_inode(struct inode *);
137 extern void udf_write_inode(struct inode *, int);
138 extern long udf_locked_block_map(struct inode *, long);
139 extern long udf_block_map(struct inode *, long);
140 extern int inode_bmap(struct inode *, int, lb_addr *, Uint32 *, lb_addr *, Uint32 *, Uint32 *, struct buffer_head **);
141 extern int udf_add_aext(struct inode *, lb_addr *, int *, lb_addr, Uint32, struct buffer_head **, int);
142 extern int udf_write_aext(struct inode *, lb_addr, int *, lb_addr, Uint32, struct buffer_head **, int);
143 extern int udf_insert_aext(struct inode *, lb_addr, int, lb_addr, Uint32, struct buffer_head *);
144 extern int udf_delete_aext(struct inode *, lb_addr, int, lb_addr, Uint32, struct buffer_head *);
145 extern int udf_next_aext(struct inode *, lb_addr *, int *, lb_addr *, Uint32 *, struct buffer_head **, int);
146 extern int udf_current_aext(struct inode *, lb_addr *, int *, lb_addr *, Uint32 *, struct buffer_head **, int);
147 extern void udf_discard_prealloc(struct inode *);
148 
149 /* misc.c */
150 extern int udf_read_tagged_data(char *, int size, int fd, int block, int partref);
151 extern struct buffer_head *udf_tread(struct super_block *, int, int);
152 extern struct GenericAttrFormat *udf_add_extendedattr(struct inode *, Uint32, Uint32, Uint8, struct buffer_head **);
153 extern struct GenericAttrFormat *udf_get_extendedattr(struct inode *, Uint32, Uint8, struct buffer_head **);
154 extern struct buffer_head *udf_read_tagged(struct super_block *, Uint32, Uint32, Uint16 *);
155 extern struct buffer_head *udf_read_ptagged(struct super_block *, lb_addr, Uint32, Uint16 *);
156 extern struct buffer_head *udf_read_untagged(struct super_block *, Uint32, Uint32);
157 extern void udf_release_data(struct buffer_head *);
158 
159 /* lowlevel.c */
160 extern unsigned int udf_get_last_session(struct super_block *);
161 extern unsigned int udf_get_last_block(struct super_block *);
162 
163 /* partition.c */
164 extern Uint32 udf_get_pblock(struct super_block *, Uint32, Uint16, Uint32);
165 extern Uint32 udf_get_pblock_virt15(struct super_block *, Uint32, Uint16, Uint32);
166 extern Uint32 udf_get_pblock_virt20(struct super_block *, Uint32, Uint16, Uint32);
167 extern Uint32 udf_get_pblock_spar15(struct super_block *, Uint32, Uint16, Uint32);
168 extern void udf_fill_spartable(struct super_block *, struct udf_sparing_data *, int);
169 
170 /* unicode.c */
171 extern int udf_get_filename(Uint8 *, Uint8 *, int);
172 
173 /* ialloc.c */
174 extern void udf_free_inode(struct inode *);
175 extern struct inode * udf_new_inode (const struct inode *, int, int *);
176 
177 /* truncate.c */
178 extern void udf_trunc(struct inode *);
179 extern void udf_truncate(struct inode *);
180 
181 /* balloc.c */
182 extern void udf_free_blocks(const struct inode *, lb_addr, Uint32, Uint32);
183 extern int udf_prealloc_blocks(const struct inode *, Uint16, Uint32, Uint32);
184 extern int udf_new_block(const struct inode *, Uint16, Uint32, int *);
185 
186 /* fsync.c */
187 extern int udf_sync_file(struct file *, struct dentry *, int);
188 
189 /* directory.c */
190 extern Uint8 * udf_filead_read(struct inode *, Uint8 *, Uint8, lb_addr, int *, int *, struct buffer_head **, int *);
191 extern struct FileIdentDesc * udf_fileident_read(struct inode *, loff_t *, struct udf_fileident_bh *, struct FileIdentDesc *, lb_addr *, Uint32 *, lb_addr *, Uint32 *, Uint32 *, struct buffer_head **);
192 
193 #endif /* __KERNEL__ */
194 
195 /* Miscellaneous UDF Prototypes */
196 
197 /* unicode.c */
198 extern int udf_ustr_to_dchars(Uint8 *, const struct ustr *, int);
199 extern int udf_ustr_to_char(Uint8 *, const struct ustr *, int);
200 extern int udf_ustr_to_dstring(dstring *, const struct ustr *, int);
201 extern int udf_dchars_to_ustr(struct ustr *, const Uint8 *, int);
202 extern int udf_char_to_ustr(struct ustr *, const Uint8 *, int);
203 extern int udf_dstring_to_ustr(struct ustr *, const dstring *, int);
204 extern int udf_translate_to_linux(Uint8 *, Uint8 *, int, Uint8 *, int);
205 extern int udf_build_ustr(struct ustr *, dstring *, int);
206 extern int udf_build_ustr_exact(struct ustr *, dstring *, int);
207 extern int udf_CS0toUTF8(struct ustr *, struct ustr *);
208 extern int udf_UTF8toCS0(dstring *, struct ustr *, int);
209 
210 /* crc.c */
211 extern Uint16 udf_crc(Uint8 *, Uint32, Uint16);
212 
213 /* misc.c */
214 extern Uint32 udf64_low32(Uint64);
215 extern Uint32 udf64_high32(Uint64);
216 extern void udf_update_tag(char *, int);
217 extern void udf_new_tag(char *, Uint16, Uint16, Uint16, Uint32, int);
218 
219 /* udftime.c */
220 extern time_t *udf_stamp_to_time(time_t *, long *, timestamp);
221 extern timestamp *udf_time_to_stamp(timestamp *, time_t, long);
222 extern time_t udf_converttime (struct ktm *);
223 
224 /* directory.c */
225 extern struct FileIdentDesc * udf_get_fileident(void * buffer, int bufsize, int * offset);
226 extern extent_ad * udf_get_fileextent(void * buffer, int bufsize, int * offset);
227 extern long_ad * udf_get_filelongad(void * buffer, int bufsize, int * offset, int);
228 extern short_ad * udf_get_fileshortad(void * buffer, int bufsize, int * offset, int);
229 extern Uint8 * udf_get_filead(struct FileEntry *, Uint8 *, int, int, int, int *);
230 
231 #endif /* __UDF_DECL_H */
232 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.