commit 0287d3b3f5ce3e3a491321e37c770bb7cc2f9b84 parent 45a99ba7eb60b339c7ca64fdd886665ae4050ac7 Author: Jan Pobrislo <ccx@webprojekty.cz> Date: Tue, 21 Apr 2015 01:44:34 +0200 fix cmp handling Diffstat:
| M | zsh-functions/confz_fs_init | | | 5 | ++++- |
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/zsh-functions/confz_fs_init b/zsh-functions/confz_fs_init @@ -70,9 +70,12 @@ confz_disklabel_dos_check() { # embed file in MBR confz_mbr_code_check() { checkvars device from - if cmp -n 440 $vars[device] $vars[from]; then + local out + out=$( cmp -n 440 $vars[device] $vars[from] ) || die "$0: cmp failed" + if [[ -z $out ]]; then return 0 else + fail_reason=$out do_command=( dd bs=440B count=1 if=$vars[from] of=$vars[device] ) fi }