diff options
author | Benjamin Richter <br@waldteufel-online.net> | 2010-02-17 15:19:30 +0100 |
---|---|---|
committer | Thomas Bächler <thomas@archlinux.org> | 2010-02-20 16:18:53 +0100 |
commit | 5dc7684ed187c462bcf7cfb575c86fff2584b619 (patch) | |
tree | 70829cc3ccae057f52b452b14d39453ae8cb3c32 /init_functions | |
parent | e7ad4fe63a52babe428ece24aeb8109977f309cb (diff) | |
download | mkinitcpio-5dc7684ed187c462bcf7cfb575c86fff2584b619.tar.gz mkinitcpio-5dc7684ed187c462bcf7cfb575c86fff2584b619.tar.xz |
Use $(( )) instead of printf "%d"
Diffstat (limited to 'init_functions')
-rw-r--r-- | init_functions | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/init_functions b/init_functions index ec8981a..1258aff 100644 --- a/init_functions +++ b/init_functions @@ -48,8 +48,8 @@ default_mount_handler() { # It might be major/minor encoded as a single hex-number (lilo-style) (801) elif [ ${#root} -le 4 -a ${#root} -gt 2 ] && echo "${root}" | grep -qe '^[A-Fa-f0-9]*$'; then str_offset=$((${#root}-2)) - major=$(printf "%d" 0x${root:0:${str_offset}}) - minor=$(printf "%d" 0x${root:${str_offset}}) + major=$((0x${root:0:${str_offset}})) + minor=$((0x${root:${str_offset}})) rootdev="${major} ${minor}" root="/dev/root" fi |