summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-07-03 18:35:31 +0200
committerDave Reisner <dreisner@archlinux.org>2011-07-04 22:11:55 +0200
commitff1b729f956889973994dcc24eb208c7e99a014f (patch)
tree505d8279cda37fa69b560664d87e366d2a2b2758 /functions
parentab9e920b52ca2d178e174b04d89b3eec875deed7 (diff)
downloadmkinitcpio-ff1b729f956889973994dcc24eb208c7e99a014f.tar.gz
mkinitcpio-ff1b729f956889973994dcc24eb208c7e99a014f.tar.xz
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 <dreisner@archlinux.org>
Diffstat (limited to 'functions')
-rw-r--r--functions8
1 files changed, 4 insertions, 4 deletions
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")