[PATCH 03/14] common: env: properly propagate error code

Lucas Stach dev at lynxeye.de
Fri Feb 7 03:48:45 EST 2014


Signed-off-by: Lucas Stach <dev at lynxeye.de>
---
 common/environment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/environment.c b/common/environment.c
index ab82103..8b22edf 100644
--- a/common/environment.c
+++ b/common/environment.c
@@ -245,7 +245,7 @@ int envfs_load(const char *filename, char *dir, unsigned flags)
 	envfd = open(filename, O_RDONLY);
 	if (envfd < 0) {
 		printf("Open %s %s\n", filename, errno_str());
-		return -1;
+		return envfd;
 	}
 
 	/* read superblock */
-- 
1.8.5.3




More information about the barebox mailing list