15.12.2015 03:34, Jaegeuk Kim пишет: > Change log from v3: > o add grub_test_bit_le() ...
> + > +static inline int > +grub_f2fs_test_bit_le (int nr, const grub_uint8_t *addr) > +{ > + const grub_int32_t *p = (const grub_int32_t *)addr; > + > + nr = nr ^ 0; It does nothing. > + > + return p[nr >> 5] & (1 << (nr & 31)); > +} Well, you still miss the point - if you are working with integers you must shift differently depending on whether we are running big or little endian. But as I mentioned before, we know that bitmap is little endian so we can work with bytes and be independent of byte order. Could you test if this works for you: static inline int grub_f2fs_test_bit_le (int nr, const grub_uint8_t *addr) { return addr[nr >> 3] & (1 << (nr & 7)); } _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel