1N/A * bitmap.h - Exports for bitmap handling. Part of the Linux-NTFS project. 1N/A * Copyright (c) 2000-2004 Anton Altaparmakov 1N/A * Copyright (c) 2004-2005 Richard Russon 1N/A * modify it under the terms of the GNU General Public License as published 1N/A * by the Free Software Foundation; either version 2 of the License, or 1N/A * (at your option) any later version. 1N/A * useful, but WITHOUT ANY WARRANTY; without even the implied warranty 1N/A * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1N/A * GNU General Public License for more details. 1N/A * You should have received a copy of the GNU General Public License 1N/A * along with this program (in the main directory of the Linux-NTFS 1N/A * distribution in the file COPYING); if not, write to the Free Software 1N/A * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 1N/A * - Operations are 8-bit only to ensure the functions work both on little 1N/A * and big endian machines! So don't make them 32-bit ops! 1N/A * - bitmap starts at bit = 0 and ends at bit = bitmap size - 1. 1N/A * - _Caller_ has to make sure that the bit to operate on is less than the 1N/A * size of the bitmap. 1N/A * ntfs_bit_set - set a bit in a field of bits 1N/A * @bitmap: field of bits 1N/A * @new_value: value to set bit to (0 or 1) 1N/A * Set the bit @bit in the @bitmap to @new_value. Ignore all errors. 1N/A * ntfs_bit_get - get value of a bit in a field of bits 1N/A * @bitmap: field of bits 1N/A * Get and return the value of the bit @bit in @bitmap (0 or 1). 1N/A * Return -1 on error. 1N/A * ntfs_bit_get_and_set - get value of a bit in a field of bits and set it 1N/A * @bitmap: field of bits 1N/A * @new_value: value to set bit to (0 or 1) 1N/A * Return the value of the bit @bit and set it to @new_value (0 or 1). 1N/A * Return -1 on error. 1N/A * ntfs_bitmap_set_bit - set a bit in a bitmap 1N/A * @na: attribute containing the bitmap 1N/A * Set the @bit in the bitmap described by the attribute @na. 1N/A * On success return 0 and on error return -1 with errno set to the error code. 1N/A * ntfs_bitmap_clear_bit - clear a bit in a bitmap 1N/A * @na: attribute containing the bitmap 1N/A * @bit: bit to clear 1N/A * Clear @bit in the bitmap described by the attribute @na. 1N/A * On success return 0 and on error return -1 with errno set to the error code. 1N/A#
endif /* defined _NTFS_BITMAP_H */