summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-07-20 15:03:43 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-07-22 14:43:20 +0200
commitcb47ddee1b700d910c0459c71ce7a98035e5de5b (patch)
treeb7efce009f1423dff4bcddce5cc914c2cc19993c /commands
parentbf1b4877bcb391d1e83c56b2814b9399075f7e57 (diff)
downloadbarebox-cb47ddee1b700d910c0459c71ce7a98035e5de5b.tar.gz
barebox-cb47ddee1b700d910c0459c71ce7a98035e5de5b.tar.xz
boot: Call blspec_scan_directory() only on strings containing an absolute path
Avoids an unnecessary "Nothing bootable found on..." warning. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r--commands/boot.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/commands/boot.c b/commands/boot.c
index 152615f9a1..719ad95bc4 100644
--- a/commands/boot.c
+++ b/commands/boot.c
@@ -202,9 +202,12 @@ static int bootentry_parse_one(struct blspec *blspec, const char *name)
ret = blspec_scan_devicename(blspec, name);
if (ret > 0)
found += ret;
- ret = blspec_scan_directory(blspec, name);
- if (ret > 0)
- found += ret;
+
+ if (*name == '/') {
+ ret = blspec_scan_directory(blspec, name);
+ if (ret > 0)
+ found += ret;
+ }
}
if (!found) {