21 unsigned char *ADDR = (
unsigned char *)
addr;
33 unsigned char *ADDR = (
unsigned char *)
addr;
44 const unsigned char *ADDR = (
const unsigned char *)
addr;
49 return ((
mask & *ADDR) != 0);
54 if ((bitno < bitmap->
start) || (bitno >
bitmap->end))
64 if ((bitno < bitmap->
start) || (bitno >
bitmap->end))
110 DPRINT1(
"Mke2fs: error allocating block bitmap...\n");
130 DPRINT1(
"Mke2fs: error allocating block bitmap...\n");
151 DPRINT1(
"Mke2fs: error allocating inode bitmap...\n");
171 DPRINT1(
"Mke2fs: error allocating block bitmap...\n");
221 char *inode_bitmap =
fs->inode_map->bitmap;
222 char *bitmap_block =
NULL;
231 if (!bitmap_block)
return false;
233 memset(bitmap_block, 0xff,
fs->blocksize);
235 for (
i = 0;
i <
fs->group_desc_count;
i++)
237 memcpy(bitmap_block, inode_bitmap, nbytes);
238 blk =
fs->group_desc[
i].bg_inode_bitmap;
253 (
unsigned char *)bitmap_block));
262 inode_bitmap += nbytes;
277 char *block_bitmap =
fs->block_map->bitmap;
278 char *bitmap_block =
NULL;
290 memset(bitmap_block, 0xff,
fs->blocksize);
292 for (
i = 0;
i <
fs->group_desc_count;
i++)
294 memcpy(bitmap_block, block_bitmap, nbytes);
296 if (
i ==
fs->group_desc_count - 1)
299 nbits = (
int) ((
fs->ext2_sb->s_blocks_count
300 -
fs->ext2_sb->s_first_data_block)
305 for (
j = nbits;
j <
fs->blocksize * 8;
j++)
312 blk =
fs->group_desc[
i].bg_block_bitmap;
316#ifdef EXT2_BIG_ENDIAN_BITMAPS
317 if (!((
fs->flags & EXT2_FLAG_SWAP_BYTES) ||
318 (
fs->flags & EXT2_FLAG_SWAP_BYTES_WRITE)))
319 ext2_swap_bitmap(
fs, bitmap_block, nbytes);
325 (
unsigned char *)bitmap_block));
334 block_bitmap += nbytes;
367 char *block_bitmap = 0, *inode_bitmap = 0;
385 block_bitmap =
fs->block_map->bitmap;
397 inode_bitmap =
fs->inode_map->bitmap;
400 for (
i = 0;
i <
fs->group_desc_count;
i++)
404 blk =
fs->group_desc[
i].bg_block_bitmap;
412 (
unsigned char *) block_bitmap));
419#ifdef EXT2_BIG_ENDIAN_BITMAPS
420 if (!((
fs->flags & EXT2_FLAG_SWAP_BYTES) ||
421 (
fs->flags & EXT2_FLAG_SWAP_BYTES_READ)))
422 ext2_swap_bitmap(
fs, block_bitmap, block_nbytes);
427 memset(block_bitmap, 0, block_nbytes);
430 block_bitmap += block_nbytes;
435 blk =
fs->group_desc[
i].bg_inode_bitmap;
441 (
unsigned char *)inode_bitmap));
448#ifdef EXT2_BIG_ENDIAN_BITMAPS
449 if (!((
fs->flags & EXT2_FLAG_SWAP_BYTES) ||
450 (
fs->flags & EXT2_FLAG_SWAP_BYTES_READ)))
451 ext2_swap_bitmap(
fs, inode_bitmap, inode_nbytes);
456 memset(inode_bitmap, 0, inode_nbytes);
459 inode_bitmap += inode_nbytes;
495 if (
fs->inode_map &&
fs->block_map)
bool ext2_test_bit(int nr, void *addr)
bool ext2_test_inode_bitmap(PEXT2_BLOCK_BITMAP bitmap, ULONG inode)
bool ext2_test_block_bitmap(PEXT2_BLOCK_BITMAP bitmap, ULONG block)
bool ext2_set_bit(int nr, void *addr)
bool ext2_test_block_bitmap_range(PEXT2_BLOCK_BITMAP bitmap, ULONG block, int num)
bool ext2_write_block_bitmap(PEXT2_FILESYS fs)
bool ext2_read_bitmaps(PEXT2_FILESYS fs)
bool ext2_read_block_bitmap(PEXT2_FILESYS fs)
bool ext2_write_bitmaps(PEXT2_FILESYS fs)
bool ext2_read_inode_bitmap(PEXT2_FILESYS fs)
void ext2_free_inode_bitmap(PEXT2_FILESYS Ext2Sys)
bool ext2_allocate_block_bitmap(PEXT2_FILESYS Ext2Sys)
bool ext2_mark_bitmap(PEXT2_BITMAP bitmap, ULONG bitno)
bool ext2_clear_bit(int nr, void *addr)
bool ext2_unmark_bitmap(PEXT2_BITMAP bitmap, ULONG bitno)
bool ext2_allocate_inode_bitmap(PEXT2_FILESYS Ext2Sys)
bool ext2_write_inode_bitmap(PEXT2_FILESYS fs)
bool read_bitmaps(PEXT2_FILESYS fs, int do_inode, int do_block)
void ext2_free_generic_bitmap(PEXT2_GENERIC_BITMAP bitmap)
void ext2_free_block_bitmap(PEXT2_FILESYS Ext2Sys)
NTSTATUS Ext2WriteDisk(PEXT2_FILESYS Ext2Sys, ULONGLONG Offset, ULONG Length, PVOID Buffer)
EXT2_BITMAP EXT2_BLOCK_BITMAP
EXT2_BITMAP EXT2_INODE_BITMAP
EXT2_BITMAP * PEXT2_INODE_BITMAP
EXT2_BITMAP * PEXT2_BLOCK_BITMAP
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
#define NT_SUCCESS(StatCode)
static void cleanup(void)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
#define EXT2_BLOCKS_PER_GROUP(s)
#define EXT2_INODES_PER_GROUP(s)
NTSTATUS Ext2ReadDisk(IN PEXT2_VCB Vcb, IN ULONGLONG Offset, IN ULONG Size, IN PVOID Buffer, IN BOOLEAN bVerify)
GLenum const GLvoid * addr
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
EXPORT void do_inode(struct directory *dpnt)
#define memcpy(s1, s2, n)
PEXT2_SUPER_BLOCK ext2_sb
PEXT2_BLOCK_BITMAP block_map
PEXT2_INODE_BITMAP inode_map
static unsigned int block