Go to the documentation of this file.
9 #ifndef _LINUX_HFS_FS_H
10 #define _LINUX_HFS_FS_H
12 #include <linux/slab.h>
13 #include <linux/types.h>
19 #include <asm/byteorder.h>
20 #include <asm/uaccess.h>
24 #define DBG_BNODE_REFS 0x00000001
25 #define DBG_BNODE_MOD 0x00000002
26 #define DBG_CAT_MOD 0x00000004
27 #define DBG_INODE 0x00000008
28 #define DBG_SUPER 0x00000010
29 #define DBG_EXTENT 0x00000020
30 #define DBG_BITMAP 0x00000040
37 #define dprint(flg, fmt, args...) \
38 if (flg & DBG_MASK) printk(fmt , ## args)
72 #define HFS_FLG_RSRC 0x0001
73 #define HFS_FLG_EXT_DIRTY 0x0002
74 #define HFS_FLG_EXT_NEW 0x0004
76 #define HFS_IS_RSRC(inode) (HFS_I(inode)->flags & HFS_FLG_RSRC)
152 #define HFS_FLG_BITMAP_DIRTY 0
153 #define HFS_FLG_MDB_DIRTY 1
154 #define HFS_FLG_ALT_MDB_DIRTY 2
218 extern int hfs_strcmp(
const unsigned char *,
unsigned int,
219 const unsigned char *,
unsigned int);
221 const struct inode *pinode,
223 unsigned int len,
const char *
str,
const struct qstr *
name);
241 #define __hfs_u_to_mtime(sec) cpu_to_be32(sec + 2082844800U - sys_tz.tz_minuteswest * 60)
242 #define __hfs_m_to_utime(sec) (be32_to_cpu(sec) - 2082844800U + sys_tz.tz_minuteswest * 60)
244 #define HFS_I(inode) (list_entry(inode, struct hfs_inode_info, vfs_inode))
245 #define HFS_SB(sb) ((struct hfs_sb_info *)(sb)->s_fs_info)
247 #define hfs_m_to_utime(time) (struct timespec){ .tv_sec = __hfs_m_to_utime(time) }
248 #define hfs_u_to_mtime(time) __hfs_u_to_mtime((time).tv_sec)
249 #define hfs_mtime() __hfs_u_to_mtime(get_seconds())
251 static inline const char *hfs_mdb_name(
struct super_block *
sb)
262 #define sb_bread512(sb, sec, data) ({ \
263 struct buffer_head *__bh; \
268 __start = (loff_t)(sec) << HFS_SECTOR_SIZE_BITS;\
269 __block = __start >> (sb)->s_blocksize_bits; \
270 __offset = __start & ((sb)->s_blocksize - 1); \
271 __bh = sb_bread((sb), __block); \
272 if (likely(__bh != NULL)) \
273 data = (void *)(__bh->b_data + __offset);\