mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Mainz, Roland" <R.Mainz@eckelmann.de>
To: "customers.eckelmann@pengutronix.de"
	<customers.eckelmann@pengutronix.de>,
	"barebox@lists.infradead.org" <barebox@lists.infradead.org>
Cc: "Arne Wichmann (arne.wichmann@thinventions.de)"
	<arne.wichmann@thinventions.de>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: 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 09:40:26 +0000	[thread overview]
Message-ID: <7954aa66b7cd4e0583b8f96e6ee3292b@eckelmann.de> (raw)


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

Problem:
The barebox sh's "test"/"[" shell builtin returns "true" for /dev/nand0.var.ubi.blablablub even if there is no "blablablub" partition on the "var" volume.

Example:
-------- snip --------
barebox:/ ls -l /dev
crw-------         153600 fb0
cr--------              0 full
crw-------             32 imx_iim_bank0
crw-------             32 imx_iim_bank1
crw-------             32 imx_iim_bank2
crw-------            256 mc34704
crw-------     4294967295 mem
crw-------      134217728 nand0
crw-------        1048576 nand0.barebox
crw-------        1048576 nand0.barebox.bb
crw-------      133955584 nand0.bb
crw-------        1048576 nand0.environment
crw-------        1048576 nand0.environment.bb
cr--------        4194304 nand0.oob
crw-------      138412032 nand0.raw
crw-------       83886080 nand0.root
crw-------       83886080 nand0.root.bb
crw-------       45744128 nand0.var
crw-------       45481984 nand0.var.bb
c---------              0 nand0.var.ubi
crw-------       23617536 nand0.var.ubi.rw
crw-------       15110144 nand0.var.ubi.stat
c-w-------              0 null
cr--------              0 prng
crw-------      134217728 ram0
c-w-------              0 serial4-1
cr--------              0 zero
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
-------- snip --------

----

Mfg,
Roland Mainz
-- 
Roland Mainz, MAA/CAS
Eckelmann AG, Berliner Str. 161, 65205 Wiesbaden
Telefon +49/611/7103-661, Fax +49/611/7103-133
r.mainz@eckelmann.de

Eckelmann Group - Source of inspiration



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

             reply	other threads:[~2019-09-02  9:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-02  9:40 Mainz, Roland [this message]
2019-09-02 12:08 ` Sascha Hauer
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=7954aa66b7cd4e0583b8f96e6ee3292b@eckelmann.de \
    --to=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