confz

git mirror of https://ccx.te2000.cz/bzr/confz
git clone https://ccx.te2000.cz/git/confz
Log | Files | Refs

commit 5c07e88b7290dd9fc84d1299da00ec680a672066
parent 0287d3b3f5ce3e3a491321e37c770bb7cc2f9b84
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date:   Tue, 21 Apr 2015 01:48:37 +0200

even better cmp handling
Diffstat:
Mzsh-functions/confz_fs_init | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/zsh-functions/confz_fs_init b/zsh-functions/confz_fs_init @@ -70,9 +70,7 @@ confz_disklabel_dos_check() { # embed file in MBR confz_mbr_code_check() { checkvars device from - local out - out=$( cmp -n 440 $vars[device] $vars[from] ) || die "$0: cmp failed" - if [[ -z $out ]]; then + if dd if=$vars[device] bs=440 count=1 | cmp -s - $vars[from]; then return 0 else fail_reason=$out