Revision 0d67af87

b/snf-image-helper/common.sh
95 95
    fi
96 96
}
97 97

  
98
normalize_unit() {
99
    unit=$(tr [a-z] [A-Z] <<< $1)
100

  
101
    case $unit in
102
        "S") echo "s";;
103
        "B"|"") echo "B";;
104
        "KB") echo "kB";;
105
        "MB") echo "MB";;
106
        "GB") echo "GB";;
107
        *)  log_error "Unknown unit type: \`$1'";;
108
    esac
109
}
110

  
111 98
get_last_partition_id() {
112 99
    local dev="$1"
113 100
    if ! output="$("$PARTED" -s -m "$dev" print)"; then

Also available in: Unified diff