1 /* vi: set sw=4 ts=4: */
3 * gen_bitmap.c --- Generic bitmap routines that used to be inlined.
5 * Copyright (C) 2001 Theodore Ts'o.
8 * This file may be redistributed under the terms of the GNU Public
25 #include <sys/types.h>
31 int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap
,
34 if ((bitno
< bitmap
->start
) || (bitno
> bitmap
->end
)) {
35 ext2fs_warn_bitmap2(bitmap
, EXT2FS_MARK_ERROR
, bitno
);
38 return ext2fs_set_bit(bitno
- bitmap
->start
, bitmap
->bitmap
);
41 int ext2fs_unmark_generic_bitmap(ext2fs_generic_bitmap bitmap
,
44 if ((bitno
< bitmap
->start
) || (bitno
> bitmap
->end
)) {
45 ext2fs_warn_bitmap2(bitmap
, EXT2FS_UNMARK_ERROR
, bitno
);
48 return ext2fs_clear_bit(bitno
- bitmap
->start
, bitmap
->bitmap
);