From: Daniel Walker <danielwa@cisco.com>
To: Richard Weinberger <richard.weinberger@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
nkela@cisco.com, xe-linux-external@cisco.com,
LKML <linux-kernel@vger.kernel.org>,
"linux-mtd @ lists . infradead . org"
<linux-mtd@lists.infradead.org>, Rod Whitby <rod@whitby.id.au>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH] Make JFFS2 endianness configurable
Date: Fri, 2 Nov 2018 14:14:44 -0700 [thread overview]
Message-ID: <20181102211444.nqqqbd4w5diyqrfw@zorba> (raw)
In-Reply-To: <CAFLxGvy-0-A1Ta1vf=o4q0tcJAdr+uv9eQc7UrnwqF9NkJiWUw@mail.gmail.com>
On Fri, Nov 02, 2018 at 09:15:06PM +0100, Richard Weinberger wrote:
> On Fri, Nov 2, 2018 at 3:04 PM Daniel Walker <danielwa@cisco.com> 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.
It's actually a mkfs option currently. I'm not sure how that factors in,
from the mkfs.jffs2 man page,
-l, --little-endian
Create a little-endian JFFS2 image. Default is to make an image with the same endianness as the host.
-b, --big-endian
Create a big-endian JFFS2 image. Default is to make an image with the same endianness as the host.
Daniel
next prev parent reply other threads:[~2018-11-02 21:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-01 22:56 Nikunj Kela
2018-11-02 0:02 ` Daniel Walker
2018-11-02 0:34 ` Al Viro
2018-11-02 14:04 ` Daniel Walker
2018-11-02 20:15 ` Richard Weinberger
2018-11-02 21:14 ` Daniel Walker [this message]
2018-11-02 21:22 ` Richard Weinberger
2018-11-07 1:09 ` Nikunj Kela (nkela)
2018-11-02 8:45 ` Joakim Tjernlund
2018-11-02 9:28 ` Richard Weinberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181102211444.nqqqbd4w5diyqrfw@zorba \
--to=danielwa@cisco.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=nkela@cisco.com \
--cc=richard.weinberger@gmail.com \
--cc=rod@whitby.id.au \
--cc=viro@zeniv.linux.org.uk \
--cc=xe-linux-external@cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®