diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-03-04 09:21:37 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-03-04 09:21:37 +0100 |
commit | 13408877f4c0d4b2784d3388dd4481369205e46a (patch) | |
tree | 81bd24a8bac468785989c5b8b82a489befcddc5a /scripts | |
parent | 908bc8ce45f428658dab5826eb6fa2e5d9151aa1 (diff) | |
parent | 14743045fb31bd1d2d4b7eb2ccd2e956b44b01bd (diff) | |
download | barebox-13408877f4c0d4b2784d3388dd4481369205e46a.tar.gz barebox-13408877f4c0d4b2784d3388dd4481369205e46a.tar.xz |
Merge branch 'for-next/misc'
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.lib | 8 | ||||
-rw-r--r-- | scripts/bareboxenv.c | 16 |
2 files changed, 20 insertions, 4 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index f7d672160c..871c44b482 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -21,6 +21,14 @@ lib-y := $(filter-out $(obj-y), $(sort $(lib-y) $(lib-m))) # o if we encounter foo/ in $(obj-m), remove it from $(obj-m) # and add the directory to the list of dirs to descend into: $(subdir-m) +# lowlevel is present in the PBL if enabled +# otherwise in barebox +ifeq ($(CONFIG_PBL_IMAGE), y) +pbl-y += $(lwl-y) +else +obj-y += $(lwl-y) +endif + # for non dirs add pbl- prefix to the target # so we recompile the source with custom flags and custom quiet __pbl-y := $(notdir $(pbl-y)) diff --git a/scripts/bareboxenv.c b/scripts/bareboxenv.c index 9284c0b083..6d6d55b1db 100644 --- a/scripts/bareboxenv.c +++ b/scripts/bareboxenv.c @@ -137,7 +137,7 @@ void usage(char *prgname) int main(int argc, char *argv[]) { int opt; - int save = 0, load = 0, pad = 0, fd; + int save = 0, load = 0, pad = 0, err = 0, fd; char *filename = NULL, *dirname = NULL; int verbose = 0; @@ -190,12 +190,20 @@ int main(int argc, char *argv[]) if (load) { if (verbose) printf("loading env from file %s to %s\n", filename, dirname); - envfs_load(filename, dirname, 0); + + err = envfs_load(filename, dirname, 0); + + if (verbose && err) + printf("loading env failed: %d\n", err); } if (save) { if (verbose) printf("saving contents of %s to file %s\n", dirname, filename); - envfs_save(filename, dirname); + + err = envfs_save(filename, dirname); + + if (verbose && err) + printf("saving env failed: %d\n", err); } - exit(0); + exit(err ? 1 : 0); } |