From 7ad978045dbc4bb45c0cc7b0629be18aa8d9ba7f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 25 Sep 2005 05:18:04 +0000 Subject: fix building with debugging enabled #413 --- e2fsprogs/ext2fs/ext2fs.h | 166 ---------------------------------------------- 1 file changed, 166 deletions(-) (limited to 'e2fsprogs/ext2fs/ext2fs.h') diff --git a/e2fsprogs/ext2fs/ext2fs.h b/e2fsprogs/ext2fs/ext2fs.h index 4bf5e5bba..bad2f9e58 100644 --- a/e2fsprogs/ext2fs/ext2fs.h +++ b/e2fsprogs/ext2fs/ext2fs.h @@ -962,172 +962,6 @@ extern int ext2fs_group_of_ino(ext2_filsys fs, ext2_ino_t ino); extern blk_t ext2fs_inode_data_blocks(ext2_filsys fs, struct ext2_inode *inode); -/* - * The actual inlined functions definitions themselves... - * - * If NO_INLINE_FUNCS is defined, then we won't try to do inline - * functions at all! - */ -#if (defined(INCLUDE_INLINE_FUNCS) || !defined(NO_INLINE_FUNCS)) -#ifdef INCLUDE_INLINE_FUNCS -#define _INLINE_ extern -#else -#ifdef __GNUC__ -#define _INLINE_ extern __inline__ -#else /* For Watcom C */ -#define _INLINE_ extern inline -#endif -#endif - -#ifndef EXT2_CUSTOM_MEMORY_ROUTINES -/* - * Allocate memory - */ -_INLINE_ errcode_t ext2fs_get_mem(unsigned long size, void *ptr) -{ - void **pp = (void **)ptr; - - *pp = malloc(size); - if (!*pp) - return EXT2_ET_NO_MEMORY; - return 0; -} - -/* - * Free memory - */ -_INLINE_ errcode_t ext2fs_free_mem(void *ptr) -{ - void **pp = (void **)ptr; - - free(*pp); - *pp = 0; - return 0; -} - -/* - * Resize memory - */ -_INLINE_ errcode_t ext2fs_resize_mem(unsigned long EXT2FS_ATTR((unused)) old_size, - unsigned long size, void *ptr) -{ - void *p; - void **pp = (void **)ptr; - - p = realloc(*pp, size); - if (!p) - return EXT2_ET_NO_MEMORY; - *pp = p; - return 0; -} -#endif /* Custom memory routines */ - -/* - * Mark a filesystem superblock as dirty - */ -_INLINE_ void ext2fs_mark_super_dirty(ext2_filsys fs) -{ - fs->flags |= EXT2_FLAG_DIRTY | EXT2_FLAG_CHANGED; -} - -/* - * Mark a filesystem as changed - */ -_INLINE_ void ext2fs_mark_changed(ext2_filsys fs) -{ - fs->flags |= EXT2_FLAG_CHANGED; -} - -/* - * Check to see if a filesystem has changed - */ -_INLINE_ int ext2fs_test_changed(ext2_filsys fs) -{ - return (fs->flags & EXT2_FLAG_CHANGED); -} - -/* - * Mark a filesystem as valid - */ -_INLINE_ void ext2fs_mark_valid(ext2_filsys fs) -{ - fs->flags |= EXT2_FLAG_VALID; -} - -/* - * Mark a filesystem as NOT valid - */ -_INLINE_ void ext2fs_unmark_valid(ext2_filsys fs) -{ - fs->flags &= ~EXT2_FLAG_VALID; -} - -/* - * Check to see if a filesystem is valid - */ -_INLINE_ int ext2fs_test_valid(ext2_filsys fs) -{ - return (fs->flags & EXT2_FLAG_VALID); -} - -/* - * Mark the inode bitmap as dirty - */ -_INLINE_ void ext2fs_mark_ib_dirty(ext2_filsys fs) -{ - fs->flags |= EXT2_FLAG_IB_DIRTY | EXT2_FLAG_CHANGED; -} - -/* - * Mark the block bitmap as dirty - */ -_INLINE_ void ext2fs_mark_bb_dirty(ext2_filsys fs) -{ - fs->flags |= EXT2_FLAG_BB_DIRTY | EXT2_FLAG_CHANGED; -} - -/* - * Check to see if a filesystem's inode bitmap is dirty - */ -_INLINE_ int ext2fs_test_ib_dirty(ext2_filsys fs) -{ - return (fs->flags & EXT2_FLAG_IB_DIRTY); -} - -/* - * Check to see if a filesystem's block bitmap is dirty - */ -_INLINE_ int ext2fs_test_bb_dirty(ext2_filsys fs) -{ - return (fs->flags & EXT2_FLAG_BB_DIRTY); -} - -/* - * Return the group # of a block - */ -_INLINE_ int ext2fs_group_of_blk(ext2_filsys fs, blk_t blk) -{ - return (blk - fs->super->s_first_data_block) / - fs->super->s_blocks_per_group; -} - -/* - * Return the group # of an inode number - */ -_INLINE_ int ext2fs_group_of_ino(ext2_filsys fs, ext2_ino_t ino) -{ - return (ino - 1) / fs->super->s_inodes_per_group; -} - -_INLINE_ blk_t ext2fs_inode_data_blocks(ext2_filsys fs, - struct ext2_inode *inode) -{ - return inode->i_blocks - - (inode->i_file_acl ? fs->blocksize >> 9 : 0); -} -#undef _INLINE_ -#endif - #ifdef __cplusplus } #endif -- cgit v1.2.3