summaryrefslogtreecommitdiffstats
path: root/common/bbu.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/bbu.c')
-rw-r--r--common/bbu.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/common/bbu.c b/common/bbu.c
index f08ce7e0d5..ba2566acdf 100644
--- a/common/bbu.c
+++ b/common/bbu.c
@@ -95,17 +95,23 @@ out:
int bbu_confirm(struct bbu_data *data)
{
int key;
+ const char *prompt;
if (data->flags & BBU_FLAG_YES)
- return 0;
+ prompt = ".";
+ else
+ prompt = " (y/n)?";
if (data->imagefile)
- printf("update barebox from %s using handler %s to %s (y/n)?\n",
- data->imagefile, data->handler_name,
- data->devicefile);
+ printf("update barebox on %s from %s using handler %s%s\n",
+ data->devicefile, data->imagefile,
+ data->handler_name, prompt);
else
- printf("Refresh barebox on %s using handler %s (y/n)?\n",
- data->devicefile, data->handler_name);
+ printf("Refresh barebox on %s using handler %s%s\n",
+ data->devicefile, data->handler_name, prompt);
+
+ if (data->flags & BBU_FLAG_YES)
+ return 0;
key = read_key();