mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Mainz, Roland" <R.Mainz@eckelmann.de>
Cc: "customers.eckelmann@pengutronix.de"
	<customers.eckelmann@pengutronix.de>,
	"Arne Wichmann (arne.wichmann@thinventions.de)"
	<arne.wichmann@thinventions.de>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: barebox bug, sh [ -c /dev/nand0.var.ubi.blablablub ] returns |true| even if there is no "blablablub" partition on "var" volume
Date: Mon, 2 Sep 2019 14:08:10 +0200	[thread overview]
Message-ID: <20190902120810.kbzeqpxqacn7f57k@pengutronix.de> (raw)
In-Reply-To: <7954aa66b7cd4e0583b8f96e6ee3292b@eckelmann.de>

Hi Roland,

On Mon, Sep 02, 2019 at 09:40:26AM +0000, Mainz, Roland wrote:
> 
> Hi!
> 
> ----
> 
> Quick&dirty bug report:
> 
> - Version: barebox 2018.05.0-20190221-1-EAG_3.00-gf70df96 #1 Mon Sep 2 09:03:05 CEST 2019
> - Hardware: Eckelmann/EAG Quantron
> 
> barebox:/ ls -l /dev/nand0.var.ubi.blablablub                                               
> ls: /dev/nand0.var.ubi.blablablub: No such file or directory
> barebox:/ ls -l /dev/nand0.var.ubi.blablablub                        
> ls: /dev/nand0.var.ubi.blablablub: No such file or directory
> barebox:/ if [ -c /dev/nand0.var.ubi.blablablub ] ; then echo wrong ; else echo "right" ; fi
> wrong
> barebox:/ if [ -f /dev/nand0.var.ubi.blablablub ] ; then echo wrong ; else echo "right" ; fi
> right

barebox doesn't implement -c for test. You'll have to use -e or -f to
test for existence.
Arguably we should throw an error for this unsupported option rather
than doing something undefined.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2019-09-02 12:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-02  9:40 Mainz, Roland
2019-09-02 12:08 ` Sascha Hauer [this message]
2019-09-02 12:37   ` Mainz, Roland
2019-09-02 21:30     ` Robert Schwebel

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=20190902120810.kbzeqpxqacn7f57k@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=R.Mainz@eckelmann.de \
    --cc=arne.wichmann@thinventions.de \
    --cc=barebox@lists.infradead.org \
    --cc=customers.eckelmann@pengutronix.de \
    --cc=u.kleine-koenig@pengutronix.de \
    /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