From: hujianyang <hujianyang@huawei.com>
To: Joseph Balough <jbb5044@gmail.com>
Cc: linux-mtd <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH 2/2] mtd: ubiformat: Add confirmation fail exit
Date: Tue, 6 Jan 2015 09:48:28 +0800 [thread overview]
Message-ID: <54AB3EEC.2080500@huawei.com> (raw)
In-Reply-To: <CACuXwh5eGfpQ6=qJH2_O5yGiK82pxF1mJHaG8X+Hpa50P5PZww@mail.gmail.com>
On 2015/1/5 23:07, Joseph Balough wrote:
>
> On Sat, Jan 3, 2015 at 9:38 PM, hujianyang <hujianyang@huawei.com <mailto:hujianyang@huawei.com>> wrote:
>
>
> There is not need to return different values for any error cases, and a
> positive return value is not proper for a aborted case.
>
> Just print a error message at failure happening is enough, I think.
>
>
> It was useful for me to know what the specific error was -- A messed up ubi file could indicate a bad download while a confirm error could indicate bad flash. It's no problem for me, I can just leave my patch as something I apply locally. I do wonder about the current exit value on error. ubiformat currently exits -1 when there is an error. The exit status for programs in UNIX are 8-bit unsigned integers, so the program actually exits 255. Perhaps this should at least return 1 instead of -1.
The exit status for programs in UNIX are 8-bit unsigned integers, so the program actually exits 255. Perhaps this should at least return 1 instead of -1.
Yes, you are right~!
Sorry for it.
prev parent reply other threads:[~2015-01-06 1:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-31 14:58 [PATCH 0/2] mtd: ubiformat: Add support for image confirmation Joe Balough
2014-12-31 14:58 ` [PATCH 1/2] mtd: ubiformat: Add --confirm argument Joe Balough
2015-01-04 2:31 ` hujianyang
[not found] ` <CACuXwh49YRxqYMHyu_8YH3_VW_EaT4hAuxEWyXWosczZPbfdnA@mail.gmail.com>
2015-01-07 1:56 ` hujianyang
2014-12-31 14:58 ` [PATCH 2/2] mtd: ubiformat: Add confirmation fail exit Joe Balough
2015-01-04 2:38 ` hujianyang
[not found] ` <CACuXwh5eGfpQ6=qJH2_O5yGiK82pxF1mJHaG8X+Hpa50P5PZww@mail.gmail.com>
2015-01-06 1:48 ` hujianyang [this message]
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=54AB3EEC.2080500@huawei.com \
--to=hujianyang@huawei.com \
--cc=jbb5044@gmail.com \
--cc=linux-mtd@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.