From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Mon, 27 Jan 2014 13:51:24 -0700 Subject: [U-Boot] [PATCH V2 2/5] fs: implement infra-structure for an 'exists' function In-Reply-To: <20140126194435.C45DB380ADF@gemini.denx.de> References: <1390507020-15766-1-git-send-email-swarren@wwwdotorg.org> <1390507020-15766-2-git-send-email-swarren@wwwdotorg.org> <20140126194435.C45DB380ADF@gemini.denx.de> Message-ID: <52E6C6CC.7000604@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 01/26/2014 12:44 PM, Wolfgang Denk wrote: > Dear Stephen Warren, > > In message <1390507020-15766-2-git-send-email-swarren@wwwdotorg.org> you wrote: >> From: Stephen Warren >> >> This could be used in scripts such as: >> >> if exists mmc 0:1 /boot/boot.scr; then >> load mmc 0:1 ${scriptaddr} /boot/boot.scr >> source ${scriptaddr} >> fi > > I understand and agree with your intentions, but I dislike to invent a > new, totally non-standard command. > > In UNIX, we would use the "test" command for such purposes. Would it > not make sense to implement this feature in a more compatible way? we > have "test", soo, so we should be able to plug it in there? > > What do you think? I thought that "test -e mmc 0:1 /boot/boot.scr" was different enough from a regular Unix shell's single-argument path that it would look a little weird. Still, it works out fine, so I've sent V3 that implements this via test instead.