public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: "Guido Martínez" <guido@vanguardiasur.com.ar>
Cc: linux-mtd@lists.infradead.org,
	"Ezequiel García" <ezequiel@vanguardiasur.com.ar>,
	"Artem Bityutskiy" <dedekind1@gmail.com>
Subject: Re: [PATCH] libmtd: fix mtd_dev_present return value on legacy systems
Date: Mon, 15 Sep 2014 10:49:49 -0700	[thread overview]
Message-ID: <20140915174949.GC14832@ld-irv-0074> (raw)
In-Reply-To: <1410361000-4821-1-git-send-email-guido@vanguardiasur.com.ar>

On Wed, Sep 10, 2014 at 11:56:40AM -0300, Guido Martínez wrote:
> On legacy systems, if "/proc/mtd" doesn't exist or gives a read error,
> mtd_dev_present returns -1 (since it calls legacy_dev_present), contrary
> to what's specified in the header file.
> 
> This causes checks like
> 
>   if (mtd_dev_present(n)) {
>     ...
>   }
> 
> to give false positives. Fix this by comparing the return value to 1.
> 
> Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>

Pushed to mtd-utils.git. Thanks!

Brian

      reply	other threads:[~2014-09-15 17:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-10 14:56 [PATCH] libmtd: fix mtd_dev_present return value on legacy systems Guido Martínez
2014-09-15 17:49 ` Brian Norris [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=20140915174949.GC14832@ld-irv-0074 \
    --to=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=guido@vanguardiasur.com.ar \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox