From 3851d0db665be36484a975ff6cbd1fec49f6c041 Mon Sep 17 00:00:00 2001 From: Peter Zotov Date: Sat, 4 Dec 2010 04:15:25 +0300 Subject: [PATCH] Show an error if a file cannot be sourced. --- shell.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shell.c b/shell.c index 66dc964..c05e7a4 100644 --- a/shell.c +++ b/shell.c @@ -1,6 +1,7 @@ /* * JzBoot: an USB bootloader for JZ series of Ingenic(R) microprocessors. - * Copyright (C) 2010 Sergey Gridassov + * Copyright (C) 2010 Sergey Gridassov , + * Peter Zotov * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -299,6 +300,10 @@ static int builtin_source(int argc, char *argv[]) { int ret = shell_source(argv[1]); + if(ret == -1) { + printf("Error while sourcing file %s\n", argv[1]); + } + shell_exit = 0; return ret;