| 143 | } |
| 144 | |
| 145 | long fmap_find(const uint8_t *image, unsigned int image_len) |
| 146 | { |
| 147 | long ret = -1; |
| 148 | |
| 149 | if ((image == NULL) || (image_len == 0)) |
| 150 | return -1; |
| 151 | |
| 152 | if (popcnt(image_len) == 1) |
| 153 | ret = fmap_bsearch(image, image_len); |
| 154 | else |
| 155 | ret = fmap_lsearch(image, image_len); |
| 156 | |
| 157 | return ret; |
| 158 | } |
| 159 | |
| 160 | int fmap_print(const struct fmap *fmap) |
| 161 | { |