patch-2.4.19 linux-2.4.19/fs/udf/udfdecl.h

Next file: linux-2.4.19/fs/udf/udfend.h
Previous file: linux-2.4.19/fs/udf/udf_sb.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/fs/udf/udfdecl.h linux-2.4.19/fs/udf/udfdecl.h
@@ -1,50 +1,49 @@
 #ifndef __UDF_DECL_H
 #define __UDF_DECL_H
 
-#include <linux/udf_167.h>
-#include <linux/udf_udf.h>
-#include "udfend.h"
-
 #include <linux/udf_fs.h>
+#include "ecma_167.h"
+#include "osta_udf.h"
 
-#ifdef __KERNEL__
-
+#include <linux/fs.h>
 #include <linux/config.h>
 #include <linux/types.h>
-#include <linux/fs.h>
+
+#ifndef LINUX_VERSION_CODE
+#include <linux/version.h>
+#endif
 
 #if !defined(CONFIG_UDF_FS) && !defined(CONFIG_UDF_FS_MODULE)
 #define CONFIG_UDF_FS_MODULE
-#include <linux/udf_fs_sb.h>
 #include <linux/udf_fs_i.h>
+#include <linux/udf_fs_sb.h>
 #endif
 
+#include "udfend.h"
+
 #define udf_fixed_to_variable(x) ( ( ( (x) >> 5 ) * 39 ) + ( (x) & 0x0000001F ) )
 #define udf_variable_to_fixed(x) ( ( ( (x) / 39 ) << 5 ) + ( (x) % 39 ) )
 
+#define UDF_EXTENT_LENGTH_MASK	0x3FFFFFFF
+#define UDF_EXTENT_FLAG_MASK	0xC0000000
+
+#define UDF_NAME_PAD		4
+#define UDF_NAME_LEN		255
+#define UDF_PATH_LEN		1023
+
 #define CURRENT_UTIME	(xtime.tv_usec)
 
 #define udf_file_entry_alloc_offset(inode)\
 	((UDF_I_EXTENDED_FE(inode) ?\
-		sizeof(struct ExtendedFileEntry) :\
-		sizeof(struct FileEntry)) + UDF_I_LENEATTR(inode))
+		sizeof(struct extendedFileEntry) :\
+		sizeof(struct fileEntry)) + UDF_I_LENEATTR(inode))
 
 #define udf_ext0_offset(inode)\
-	(UDF_I_ALLOCTYPE(inode) == ICB_FLAG_AD_IN_ICB ?\
+	(UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_IN_ICB ?\
 		udf_file_entry_alloc_offset(inode) : 0)
 
 #define udf_get_lb_pblock(sb,loc,offset) udf_get_pblock((sb), (loc).logicalBlockNum, (loc).partitionReferenceNum, (offset))
 
-#else
-
-#include <sys/types.h>
-
-#endif /* __KERNEL__ */
-
-
-
-#ifdef __KERNEL__
-
 struct dentry;
 struct inode;
 struct task_struct;
@@ -67,50 +66,38 @@
 	int eoffset;
 };
 
-#endif /* __KERNEL__ */
-
 struct udf_directory_record
 {
-	Uint32	d_parent;
-	Uint32	d_inode;
-	Uint32	d_name[255];
+	uint32_t	d_parent;
+	uint32_t	d_inode;
+	uint32_t	d_name[255];
 };
 
-
 struct udf_vds_record
 {
-	Uint32 block;
-	Uint32 volDescSeqNum;
+	uint32_t block;
+	uint32_t volDescSeqNum;
 };
 
-struct ktm
+struct generic_desc
 {
-	int tm_sec;
-	int tm_min;
-	int tm_hour;
-	int tm_mday;
-	int tm_mon;
-	int tm_year;
-	int tm_isdst;
+	tag		descTag;
+	uint32_t	volDescSeqNum;
 };
 
 struct ustr
 {
-	Uint8 u_cmpID;
-	Uint8 u_name[UDF_NAME_LEN];
-	Uint8 u_len;
-	Uint8 padding;
-	unsigned long u_hash;
+	uint8_t u_cmpID;
+	uint8_t u_name[UDF_NAME_LEN];
+	uint8_t u_len;
 };
 
-#ifdef __KERNEL__
-
 /* super.c */
 extern void udf_error(struct super_block *, const char *, const char *, ...);
 extern void udf_warning(struct super_block *, const char *, const char *, ...);
 
 /* namei.c */
-extern int udf_write_fi(struct inode *inode, struct FileIdentDesc *, struct FileIdentDesc *, struct udf_fileident_bh *, Uint8 *, Uint8 *);
+extern int udf_write_fi(struct inode *inode, struct fileIdentDesc *, struct fileIdentDesc *, struct udf_fileident_bh *, uint8_t *, uint8_t *);
 
 /* file.c */
 extern int udf_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
@@ -128,24 +115,23 @@
 extern void udf_delete_inode(struct inode *);
 extern void udf_write_inode(struct inode *, int);
 extern long udf_block_map(struct inode *, long);
-extern Sint8 inode_bmap(struct inode *, int, lb_addr *, Uint32 *, lb_addr *, Uint32 *, Uint32 *, struct buffer_head **);
-extern Sint8 udf_add_aext(struct inode *, lb_addr *, int *, lb_addr, Uint32, struct buffer_head **, int);
-extern Sint8 udf_write_aext(struct inode *, lb_addr, int *, lb_addr, Uint32, struct buffer_head *, int);
-extern Sint8 udf_insert_aext(struct inode *, lb_addr, int, lb_addr, Uint32, struct buffer_head *);
-extern Sint8 udf_delete_aext(struct inode *, lb_addr, int, lb_addr, Uint32, struct buffer_head *);
-extern Sint8 udf_next_aext(struct inode *, lb_addr *, int *, lb_addr *, Uint32 *, struct buffer_head **, int);
-extern Sint8 udf_current_aext(struct inode *, lb_addr *, int *, lb_addr *, Uint32 *, struct buffer_head **, int);
+extern int8_t inode_bmap(struct inode *, int, lb_addr *, uint32_t *, lb_addr *, uint32_t *, uint32_t *, struct buffer_head **);
+extern int8_t udf_add_aext(struct inode *, lb_addr *, int *, lb_addr, uint32_t, struct buffer_head **, int);
+extern int8_t udf_write_aext(struct inode *, lb_addr, int *, lb_addr, uint32_t, struct buffer_head *, int);
+extern int8_t udf_insert_aext(struct inode *, lb_addr, int, lb_addr, uint32_t, struct buffer_head *);
+extern int8_t udf_delete_aext(struct inode *, lb_addr, int, lb_addr, uint32_t, struct buffer_head *);
+extern int8_t udf_next_aext(struct inode *, lb_addr *, int *, lb_addr *, uint32_t *, struct buffer_head **, int);
+extern int8_t udf_current_aext(struct inode *, lb_addr *, int *, lb_addr *, uint32_t *, struct buffer_head **, int);
 extern void udf_discard_prealloc(struct inode *);
 
 /* misc.c */
 extern int udf_read_tagged_data(char *, int size, int fd, int block, int partref);
 extern struct buffer_head *udf_tgetblk(struct super_block *, int);
 extern struct buffer_head *udf_tread(struct super_block *, int);
-extern struct GenericAttrFormat *udf_add_extendedattr(struct inode *, Uint32, Uint32, Uint8, struct buffer_head **);
-extern struct GenericAttrFormat *udf_get_extendedattr(struct inode *, Uint32, Uint8, struct buffer_head **);
-extern struct buffer_head *udf_read_tagged(struct super_block *, Uint32, Uint32, Uint16 *);
-extern struct buffer_head *udf_read_ptagged(struct super_block *, lb_addr, Uint32, Uint16 *);
-extern struct buffer_head *udf_read_untagged(struct super_block *, Uint32, Uint32);
+extern struct genericFormat *udf_add_extendedattr(struct inode *, uint32_t, uint32_t, uint8_t, struct buffer_head **);
+extern struct genericFormat *udf_get_extendedattr(struct inode *, uint32_t, uint8_t, struct buffer_head **);
+extern struct buffer_head *udf_read_tagged(struct super_block *, uint32_t, uint32_t, uint16_t *);
+extern struct buffer_head *udf_read_ptagged(struct super_block *, lb_addr, uint32_t, uint16_t *);
 extern void udf_release_data(struct buffer_head *);
 
 /* lowlevel.c */
@@ -153,14 +139,14 @@
 extern unsigned long udf_get_last_block(struct super_block *);
 
 /* partition.c */
-extern Uint32 udf_get_pblock(struct super_block *, Uint32, Uint16, Uint32);
-extern Uint32 udf_get_pblock_virt15(struct super_block *, Uint32, Uint16, Uint32);
-extern Uint32 udf_get_pblock_virt20(struct super_block *, Uint32, Uint16, Uint32);
-extern Uint32 udf_get_pblock_spar15(struct super_block *, Uint32, Uint16, Uint32);
+extern uint32_t udf_get_pblock(struct super_block *, uint32_t, uint16_t, uint32_t);
+extern uint32_t udf_get_pblock_virt15(struct super_block *, uint32_t, uint16_t, uint32_t);
+extern uint32_t udf_get_pblock_virt20(struct super_block *, uint32_t, uint16_t, uint32_t);
+extern uint32_t udf_get_pblock_spar15(struct super_block *, uint32_t, uint16_t, uint32_t);
 extern int udf_relocate_blocks(struct super_block *, long, long *);
 
 /* unicode.c */
-extern int udf_get_filename(struct super_block *, Uint8 *, Uint8 *, int);
+extern int udf_get_filename(struct super_block *, uint8_t *, uint8_t *, int);
 
 /* ialloc.c */
 extern void udf_free_inode(struct inode *);
@@ -170,58 +156,51 @@
 extern void udf_truncate_extents(struct inode *);
 
 /* balloc.c */
-extern void udf_free_blocks(struct super_block *, struct inode *, lb_addr, Uint32, Uint32);
-extern int udf_prealloc_blocks(struct super_block *, struct inode *, Uint16, Uint32, Uint32);
-extern int udf_new_block(struct super_block *, struct inode *, Uint16, Uint32, int *);
+extern void udf_free_blocks(struct super_block *, struct inode *, lb_addr, uint32_t, uint32_t);
+extern int udf_prealloc_blocks(struct super_block *, struct inode *, uint16_t, uint32_t, uint32_t);
+extern int udf_new_block(struct super_block *, struct inode *, uint16_t, uint32_t, int *);
 
 /* fsync.c */
 extern int udf_fsync_file(struct file *, struct dentry *, int);
 extern int udf_fsync_inode(struct inode *, int);
 
 /* directory.c */
-extern Uint8 * udf_filead_read(struct inode *, Uint8 *, Uint8, lb_addr, int *, int *, struct buffer_head **, int *);
-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 **);
-
-#endif /* __KERNEL__ */
-
-/* Miscellaneous UDF Prototypes */
+extern uint8_t * udf_filead_read(struct inode *, uint8_t *, uint8_t, lb_addr, int *, int *, struct buffer_head **, int *);
+extern struct fileIdentDesc * udf_fileident_read(struct inode *, loff_t *, struct udf_fileident_bh *, struct fileIdentDesc *, lb_addr *, uint32_t *, lb_addr *, uint32_t *, uint32_t *, struct buffer_head **);
 
 /* unicode.c */
-extern int udf_ustr_to_dchars(Uint8 *, const struct ustr *, int);
-extern int udf_ustr_to_char(Uint8 *, const struct ustr *, int);
+extern int udf_ustr_to_dchars(uint8_t *, const struct ustr *, int);
+extern int udf_ustr_to_char(uint8_t *, const struct ustr *, int);
 extern int udf_ustr_to_dstring(dstring *, const struct ustr *, int);
-extern int udf_dchars_to_ustr(struct ustr *, const Uint8 *, int);
-extern int udf_char_to_ustr(struct ustr *, const Uint8 *, int);
+extern int udf_dchars_to_ustr(struct ustr *, const uint8_t *, int);
+extern int udf_char_to_ustr(struct ustr *, const uint8_t *, int);
 extern int udf_dstring_to_ustr(struct ustr *, const dstring *, int);
-extern int udf_translate_to_linux(Uint8 *, Uint8 *, int, Uint8 *, int);
+extern int udf_translate_to_linux(uint8_t *, uint8_t *, int, uint8_t *, int);
 extern int udf_build_ustr(struct ustr *, dstring *, int);
 extern int udf_build_ustr_exact(struct ustr *, dstring *, int);
 extern int udf_CS0toUTF8(struct ustr *, struct ustr *);
 extern int udf_UTF8toCS0(dstring *, struct ustr *, int);
-#ifdef __KERNEL__
 extern int udf_CS0toNLS(struct nls_table *, struct ustr *, struct ustr *);
 extern int udf_NLStoCS0(struct nls_table *, dstring *, struct ustr *, int);
-#endif
 
 /* crc.c */
-extern Uint16 udf_crc(Uint8 *, Uint32, Uint16);
+extern uint16_t udf_crc(uint8_t *, uint32_t, uint16_t);
 
 /* misc.c */
-extern Uint32 udf64_low32(Uint64);
-extern Uint32 udf64_high32(Uint64);
+extern uint32_t udf64_low32(uint64_t);
+extern uint32_t udf64_high32(uint64_t);
 extern void udf_update_tag(char *, int);
-extern void udf_new_tag(char *, Uint16, Uint16, Uint16, Uint32, int);
+extern void udf_new_tag(char *, uint16_t, uint16_t, uint16_t, uint32_t, int);
 
 /* udftime.c */
 extern time_t *udf_stamp_to_time(time_t *, long *, timestamp);
 extern timestamp *udf_time_to_stamp(timestamp *, time_t, long);
-extern time_t udf_converttime (struct ktm *);
 
 /* directory.c */
-extern struct FileIdentDesc * udf_get_fileident(void * buffer, int bufsize, int * offset);
+extern struct fileIdentDesc * udf_get_fileident(void * buffer, int bufsize, int * offset);
 extern extent_ad * udf_get_fileextent(void * buffer, int bufsize, int * offset);
 extern long_ad * udf_get_filelongad(void * buffer, int bufsize, int * offset, int);
 extern short_ad * udf_get_fileshortad(void * buffer, int bufsize, int * offset, int);
-extern Uint8 * udf_get_filead(struct FileEntry *, Uint8 *, int, int, int, int *);
+extern uint8_t * udf_get_filead(struct fileEntry *, uint8_t *, int, int, int, int *);
 
 #endif /* __UDF_DECL_H */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)