From e558f9170096e2e397f18d13b75d8facf02e10eb Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Wed, 29 Jul 2009 23:18:43 +0200 Subject: fix some invalid show_warning invocations --- src/core/libs/lib-ui.sh | 12 ++++++------ src/core/procedures/automatic | 2 +- tests/runtime/automatic-reuse-fs-sda/profile | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/core/libs/lib-ui.sh b/src/core/libs/lib-ui.sh index c02b994..113e66d 100644 --- a/src/core/libs/lib-ui.sh +++ b/src/core/libs/lib-ui.sh @@ -358,14 +358,14 @@ _dia_ask_number () ANSWER_NUMBER=`cat $ANSWER` if [[ $ANSWER_NUMBER = *[^0-9]* ]] #TODO: handle exit state then - show_warning "$ANSWER_NUMBER is not a number! try again." + show_warning 'Invalid number input' "$ANSWER_NUMBER is not a number! try again." else if [ -n "$3" -a $3 != '0' -a $ANSWER_NUMBER -gt $3 ] then - show_warning "$ANSWER_NUMBER is bigger then the maximum,$3! try again." + show_warning 'Invalid number input' "$ANSWER_NUMBER is bigger then the maximum,$3! try again." elif [ -n "$2" -a $ANSWER_NUMBER -lt $2 ] then - show_warning "$ANSWER_NUMBER is smaller then the minimum,$2! try again." + show_warning 'Invalid number input' "$ANSWER_NUMBER is smaller then the minimum,$2! try again." else break fi @@ -514,14 +514,14 @@ _cli_ask_number () read ANSWER_NUMBER if [[ $ANSWER_NUMBER = *[^0-9]* ]] then - show_warning "$ANSWER_NUMBER is not a number! try again." + show_warning 'Invalid number input' "$ANSWER_NUMBER is not a number! try again." else if [ -n "$3" -a $3 != '0' -a $ANSWER_NUMBER -gt $3 ] then - show_warning "$ANSWER_NUMBER is bigger then the maximum,$3! try again." + show_warning 'Invalid number input' "$ANSWER_NUMBER is bigger then the maximum,$3! try again." elif [ -n "$2" -a $ANSWER_NUMBER -lt $2 ] then - show_warning "$ANSWER_NUMBER is smaller then the minimum,$2! try again." + show_warning 'Invalid number input' "$ANSWER_NUMBER is smaller then the minimum,$2! try again." else break fi diff --git a/src/core/procedures/automatic b/src/core/procedures/automatic index 7eeb70a..6c82e6a 100644 --- a/src/core/procedures/automatic +++ b/src/core/procedures/automatic @@ -86,7 +86,7 @@ worker_prepare_disks () process_disks || die_error "Could not process_disks" if ! process_filesystems then - show_warning "Could not process_filesystems" + show_warning 'Disk processing' "Could not process_filesystems" txt='also failed to execute properly' rollback_filesystems && txt='ended successfully' die_error "Something failed while processing the filesystem. A rollback was executed, which $txt" diff --git a/tests/runtime/automatic-reuse-fs-sda/profile b/tests/runtime/automatic-reuse-fs-sda/profile index 74d9b57..b2f93d7 100644 --- a/tests/runtime/automatic-reuse-fs-sda/profile +++ b/tests/runtime/automatic-reuse-fs-sda/profile @@ -11,21 +11,21 @@ worker_prepare_disks () then infofy "disk processing ok" else - show_warning "PROCESSING FAILED" + show_warning 'disks processing' "PROCESSING FAILED" return 1 fi if rollback_filesystems then infofy "rollback ok" else - show_warning "ROLLBACK FAILED" + show_warning 'disks rollback' "ROLLBACK FAILED" return 1 fi if process_filesystems then infofy "disk processing ok" else - show_warning "PROCESSING FAILED" + show_warning 'disk processing' "PROCESSING FAILED" return 1 fi } -- cgit v1.2.3-54-g00ecf