Fix warning message when adding aliases
authorBryn M. Reeves <bmr@redhat.com>
Fri, 1 Feb 2013 18:00:54 +0000 (18:00 +0000)
committerBryn M. Reeves <bmr@redhat.com>
Fri, 1 Feb 2013 18:00:54 +0000 (18:00 +0000)
When a alias already maps to a different disk print the alias
instead of the disk name when warning the user.

blkdevalias

index 14e0297..4129818 100755 (executable)
@@ -177,7 +177,7 @@ ba_add_wwid_mapping() {
     fi
     if [ "${NAMEMAP[$_ALIAS]}" != "" ]; then
         _debug "$FUNCNAME: NAMEMAP[\$ALIAS]=${NAMEMAP[$_ALIAS]}"
-        _warn "$DEV already mapped to disk ${NAMEMAP[$_ALIAS]}; replacing it."
+        _warn "$_ALIAS already mapped to disk ${NAMEMAP[$_ALIAS]}; replacing it."
         ba_del_wwid_mapping ${NAMEMAP[$_ALIAS]}
     fi
     WWIDMAP[$_WWID]="$_ALIAS"