Re: [PATCH] Make JFFS2 endianness configurable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 2, 2018 at 3:04 PM Daniel Walker <danielwa@xxxxxxxxx> wrote:
> Do you have any thought on how to implement it ? I was think abstracting the
> endian functions in the nodelist.h

Yes, see what UFS does.

> static inline jint16_t cpu_to_je16(jint16_t x) {
>         if (check_big_endian()) {
>                 return cpu_to_be16(x);
>         } else if (check_little_endian()) {
>                 return cpu_to_le16(x);
>         }
> }
>
> but how would you setup the checking ?

Make it a mount option and store the endianness mode in the super block.

-- 
Thanks,
//richard

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux