summaryrefslogtreecommitdiff
path: root/ext2fs
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-04-16 20:32:23 +0000
committerMiles Bader <miles@gnu.org>1995-04-16 20:32:23 +0000
commit9c4306d52021c407fd69160b67de954e9b226031 (patch)
treee7b949f10615e4b5c9ac0022b542f9877242871a /ext2fs
parentf6741a1a39df72c34a8d6b39ae965f2e27cb26d8 (diff)
Formerly ext2fs.h.~17~
Diffstat (limited to 'ext2fs')
-rw-r--r--ext2fs/ext2fs.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/ext2fs/ext2fs.h b/ext2fs/ext2fs.h
index 5a3823ad..9ee23604 100644
--- a/ext2fs/ext2fs.h
+++ b/ext2fs/ext2fs.h
@@ -115,13 +115,16 @@ struct user_pager_info
/* ---------------------------------------------------------------- */
+/* The block size we assume the kernel device uses. */
+#define DEV_BSIZE 512
+
struct user_pager_info *disk_pager;
mach_port_t disk_pager_port;
-off_t device_size;
-
void *disk_image;
+
char *device_name;
mach_port_t device_port;
+off_t device_size;
/* Our in-core copy of the super-block. */
struct ext2_super_block *sblock;
@@ -169,12 +172,12 @@ unsigned long nextgennumber;
/* ---------------------------------------------------------------- */
/* Functions for looking inside disk_image */
-/* The block size we assume the kernel device uses. */
-#define DEV_BSIZE 512
-
-/* Returns a pointer to the disk block BLOCK. */
-#define baddr(block) (((char *)disk_image) + (block) * DEV_BSIZE)
-#define addrb(addr) ((((char *)disk_image) - addr) / DEV_BSIZE)
+#define boffs(block) ((block) * block_size)
+#define offsb(offs) ((block) / block_size)
+#define offsaddr(offs) (((char *)disk_image) + (offs))
+#define addroffs(offs) ((addr) - ((char *)disk_image))
+#define baddr(block) offsaddr(boffs(block))
+#define addrb(addr) offsb(addroffs(addr))
/* Get the descriptor for the block group inode INUM is in. */
extern inline struct ext2_group_desc *