diff options
author | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-04-04 12:17:24 +0000 |
---|---|---|
committer | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-04-04 12:17:24 +0000 |
commit | 21b3b68ca23c565f39017f08f9410acbceea4e95 (patch) | |
tree | d10bd58a238cca941eca15ac5b6fe98f8a0dc4e3 /e2fsprogs/ext2fs | |
parent | bb4e1feedfecca0822be64fcb1226b05d6bb7e6d (diff) | |
download | busybox-w32-21b3b68ca23c565f39017f08f9410acbceea4e95.tar.gz busybox-w32-21b3b68ca23c565f39017f08f9410acbceea4e95.tar.bz2 busybox-w32-21b3b68ca23c565f39017f08f9410acbceea4e95.zip |
- remove unused ext2fs_find_first_bit_set() and ext2fs_find_next_bit_set()
git-svn-id: svn://busybox.net/trunk/busybox@14744 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'e2fsprogs/ext2fs')
-rw-r--r-- | e2fsprogs/ext2fs/ext2fs_inline.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/e2fsprogs/ext2fs/ext2fs_inline.c b/e2fsprogs/ext2fs/ext2fs_inline.c index d670065d2..1202b3526 100644 --- a/e2fsprogs/ext2fs/ext2fs_inline.c +++ b/e2fsprogs/ext2fs/ext2fs_inline.c | |||
@@ -179,51 +179,6 @@ __u32 ext2fs_swab32(__u32 val) | |||
179 | ((val<<8)&0xFF0000) | (val<<24)); | 179 | ((val<<8)&0xFF0000) | (val<<24)); |
180 | } | 180 | } |
181 | 181 | ||
182 | int ext2fs_find_first_bit_set(void * addr, unsigned size) | ||
183 | { | ||
184 | unsigned char *cp = (unsigned char *) addr; | ||
185 | int res = 0, d0; | ||
186 | |||
187 | if (!size) | ||
188 | return 0; | ||
189 | |||
190 | while ((size > res) && (*cp == 0)) { | ||
191 | cp++; | ||
192 | res += 8; | ||
193 | } | ||
194 | d0 = ffs(*cp); | ||
195 | if (d0 == 0) | ||
196 | return size; | ||
197 | |||
198 | return res + d0 - 1; | ||
199 | } | ||
200 | |||
201 | int ext2fs_find_next_bit_set (void * addr, int size, int offset) | ||
202 | { | ||
203 | unsigned char * p; | ||
204 | int set = 0, bit = offset & 7, res = 0, d0; | ||
205 | |||
206 | res = offset >> 3; | ||
207 | p = ((unsigned char *) addr) + res; | ||
208 | |||
209 | if (bit) { | ||
210 | set = ffs(*p & ~((1 << bit) - 1)); | ||
211 | if (set) | ||
212 | return (offset & ~7) + set - 1; | ||
213 | p++; | ||
214 | res += 8; | ||
215 | } | ||
216 | while ((size > res) && (*p == 0)) { | ||
217 | p++; | ||
218 | res += 8; | ||
219 | } | ||
220 | d0 = ffs(*p); | ||
221 | if (d0 == 0) | ||
222 | return size; | ||
223 | |||
224 | return (res + d0 - 1); | ||
225 | } | ||
226 | |||
227 | int ext2fs_test_generic_bitmap(ext2fs_generic_bitmap bitmap, | 182 | int ext2fs_test_generic_bitmap(ext2fs_generic_bitmap bitmap, |
228 | blk_t bitno); | 183 | blk_t bitno); |
229 | 184 | ||