mirror of https://github.com/vitalif/e2fsprogs
libext2fs: fix potential build failure with OMIT_COM_ERR
This fixes following build failure when OMIT_COM_ERR is defined: lib/ext2fs/gen_bitmap.c: In function ‘ext2fs_clear_generic_bitmap’: lib/ext2fs/gen_bitmap.c:437: error: invalid storage class for function ‘ext2fs_test_clear_generic_bitmap_range’ lib/ext2fs/gen_bitmap.c:559: error: expected declaration or statement at end of input lib/ext2fs/gen_bitmap.c: In function ‘ext2fs_get_generic_bitmap_end’: lib/ext2fs/gen_bitmap.c:559: error: expected declaration or statement at end of input lib/ext2fs/gen_bitmap.c: In function ‘ext2fs_get_generic_bitmap_start’: lib/ext2fs/gen_bitmap.c:559: error: expected declaration or statement at end of input lib/ext2fs/gen_bitmap.c: In function ‘ext2fs_unmark_generic_bitmap’: lib/ext2fs/gen_bitmap.c:559: error: expected declaration or statement at end of input lib/ext2fs/gen_bitmap.c: In function ‘ext2fs_mark_generic_bitmap’: lib/ext2fs/gen_bitmap.c:559: error: expected declaration or statement at end of input lib/ext2fs/gen_bitmap.c: In function ‘ext2fs_test_generic_bitmap’: lib/ext2fs/gen_bitmap.c:559: error: expected declaration or statement at end of input make[2]: *** [gen_bitmap.o] Error 1 make[2]: Leaving directory e2fsprogs/lib/ext2fs' make[1]: *** [all-libs-recursive] Error 1 make[1]: Leaving directory e2fsprogs' make: *** [all] Error 2 Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>bitmap-optimize
parent
562f264243
commit
beb4295ca4
|
@ -178,9 +178,9 @@ int ext2fs_test_generic_bitmap(ext2fs_generic_bitmap bitmap,
|
||||||
#ifndef OMIT_COM_ERR
|
#ifndef OMIT_COM_ERR
|
||||||
com_err(0, EXT2_ET_MAGIC_GENERIC_BITMAP,
|
com_err(0, EXT2_ET_MAGIC_GENERIC_BITMAP,
|
||||||
"test_bitmap(%lu)", (unsigned long) bitno);
|
"test_bitmap(%lu)", (unsigned long) bitno);
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if ((bitno < bitmap->start) || (bitno > bitmap->end)) {
|
if ((bitno < bitmap->start) || (bitno > bitmap->end)) {
|
||||||
ext2fs_warn_bitmap2(bitmap, EXT2FS_TEST_ERROR, bitno);
|
ext2fs_warn_bitmap2(bitmap, EXT2FS_TEST_ERROR, bitno);
|
||||||
|
@ -200,9 +200,9 @@ int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap,
|
||||||
#ifndef OMIT_COM_ERR
|
#ifndef OMIT_COM_ERR
|
||||||
com_err(0, EXT2_ET_MAGIC_GENERIC_BITMAP,
|
com_err(0, EXT2_ET_MAGIC_GENERIC_BITMAP,
|
||||||
"mark_bitmap(%lu)", (unsigned long) bitno);
|
"mark_bitmap(%lu)", (unsigned long) bitno);
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if ((bitno < bitmap->start) || (bitno > bitmap->end)) {
|
if ((bitno < bitmap->start) || (bitno > bitmap->end)) {
|
||||||
ext2fs_warn_bitmap2(bitmap, EXT2FS_MARK_ERROR, bitno);
|
ext2fs_warn_bitmap2(bitmap, EXT2FS_MARK_ERROR, bitno);
|
||||||
|
@ -222,9 +222,9 @@ int ext2fs_unmark_generic_bitmap(ext2fs_generic_bitmap bitmap,
|
||||||
#ifndef OMIT_COM_ERR
|
#ifndef OMIT_COM_ERR
|
||||||
com_err(0, EXT2_ET_MAGIC_GENERIC_BITMAP,
|
com_err(0, EXT2_ET_MAGIC_GENERIC_BITMAP,
|
||||||
"mark_bitmap(%lu)", (unsigned long) bitno);
|
"mark_bitmap(%lu)", (unsigned long) bitno);
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if ((bitno < bitmap->start) || (bitno > bitmap->end)) {
|
if ((bitno < bitmap->start) || (bitno > bitmap->end)) {
|
||||||
ext2fs_warn_bitmap2(bitmap, EXT2FS_UNMARK_ERROR, bitno);
|
ext2fs_warn_bitmap2(bitmap, EXT2FS_UNMARK_ERROR, bitno);
|
||||||
|
@ -243,9 +243,9 @@ __u32 ext2fs_get_generic_bitmap_start(ext2fs_generic_bitmap bitmap)
|
||||||
#ifndef OMIT_COM_ERR
|
#ifndef OMIT_COM_ERR
|
||||||
com_err(0, EXT2_ET_MAGIC_GENERIC_BITMAP,
|
com_err(0, EXT2_ET_MAGIC_GENERIC_BITMAP,
|
||||||
"get_bitmap_start");
|
"get_bitmap_start");
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return bitmap->start;
|
return bitmap->start;
|
||||||
}
|
}
|
||||||
|
@ -260,9 +260,9 @@ __u32 ext2fs_get_generic_bitmap_end(ext2fs_generic_bitmap bitmap)
|
||||||
#ifndef OMIT_COM_ERR
|
#ifndef OMIT_COM_ERR
|
||||||
com_err(0, EXT2_ET_MAGIC_GENERIC_BITMAP,
|
com_err(0, EXT2_ET_MAGIC_GENERIC_BITMAP,
|
||||||
"get_bitmap_end");
|
"get_bitmap_end");
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return bitmap->end;
|
return bitmap->end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,9 +277,9 @@ void ext2fs_clear_generic_bitmap(ext2fs_generic_bitmap bitmap)
|
||||||
#ifndef OMIT_COM_ERR
|
#ifndef OMIT_COM_ERR
|
||||||
com_err(0, EXT2_ET_MAGIC_GENERIC_BITMAP,
|
com_err(0, EXT2_ET_MAGIC_GENERIC_BITMAP,
|
||||||
"clear_generic_bitmap");
|
"clear_generic_bitmap");
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
memset(bitmap->bitmap, 0,
|
memset(bitmap->bitmap, 0,
|
||||||
(size_t) (((bitmap->real_end - bitmap->start) / 8) + 1));
|
(size_t) (((bitmap->real_end - bitmap->start) / 8) + 1));
|
||||||
|
|
Loading…
Reference in New Issue