From ff1b729f956889973994dcc24eb208c7e99a014f Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 3 Jul 2011 12:35:31 -0400 Subject: unify error messaging, both in grammar and output This also removes a superfluous check on MODULEDIR, which is already covered by get_kernver. Signed-off-by: Dave Reisner --- functions | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'functions') diff --git a/functions b/functions index ffb00ec..ac0617c 100644 --- a/functions +++ b/functions @@ -162,7 +162,7 @@ add_module() { done < <(modinfo -b "$BASEDIR" -k "$KERNELVERSION" -0 "$module" 2>/dev/null) if [[ -z $path ]]; then - error "module '$module' not found" + error "module not found: \`%s'" "$module" return 1 fi @@ -229,11 +229,11 @@ add_file() { src=$BASEDIR$1 - [[ -f "$src" ]] || { error "$src: No such file"; return 1; } + [[ -f "$src" ]] || { error "file not found: \`%s'" "$src"; return 1; } mode=$(stat -c %a "$src") if [[ -z "$mode" ]]; then - error "failed to stat file: \`$src'" + error "failed to stat file: \`%s'." "$src" return 1 fi @@ -251,7 +251,7 @@ add_binary() { binary=$BASEDIR$1 - [[ -f "$binary" ]] || { error "$binary not found"; return 1; } + [[ -f "$binary" ]] || { error "file not found: \`%s'" "$binary"; return 1; } dest=${2:-$binary} mode=$(stat -c %a "$binary") -- cgit v1.2.3-24-g4f1b