!22 fix incorrect total message in check-embedded mode

From: @cao-fei8 
Reviewed-by: @Charlie_li 
Signed-off-by: @Charlie_li
This commit is contained in:
openeuler-ci-bot 2023-01-06 07:13:54 +00:00 committed by Gitee
commit f785e28e5b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From 5796c94b1eba4fb7407868555e630b409340b78e Mon Sep 17 00:00:00 2001
From: Aleksey <rhash.admin@gmail.com>
Date: Sat, 11 Sep 2021 21:23:34 +0300
Subject: [PATCH] fix incorrect total message in check-embedded mode
---
hash_check.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hash_check.c b/hash_check.c
index 0c0ed84..0ed88ce 100644
--- a/hash_check.c
+++ b/hash_check.c
@@ -1147,7 +1147,7 @@ static int check_embedded_crc32(file_t* file)
log_error_file_t(&rhash_data.out_file);
res = -2;
} else if (!rhash_data.stop_flags) {
- if (res >= 0)
+ if (res == 0)
rhash_data.ok++;
else if (res == -1 && errno == ENOENT)
rhash_data.miss++;
--
2.33.0

View File

@ -1,6 +1,6 @@
Name: rhash Name: rhash
Version: 1.4.2 Version: 1.4.2
Release: 3 Release: 4
Summary: Great utility for computing hash sums Summary: Great utility for computing hash sums
License: MIT License: MIT
URL: https://github.com/rhash/RHash URL: https://github.com/rhash/RHash
@ -9,6 +9,7 @@ Source0: https://github.com/rhash/RHash/archive/v%{version}/rhash-%{versi
#References: https://github.com/rhash/RHash/commit/79a1a0b3d267893c40ac31192b20e20969a3a79c #References: https://github.com/rhash/RHash/commit/79a1a0b3d267893c40ac31192b20e20969a3a79c
Patch0: Fix-bug-with-hash-options-in-check-mode.patch Patch0: Fix-bug-with-hash-options-in-check-mode.patch
Patch1: RHash-1.4.2-sw.patch Patch1: RHash-1.4.2-sw.patch
Patch2: 0001-fix-incorrect-total-message-in-check-embedded-mode.patch
BuildRequires: gcc BuildRequires: gcc
@ -39,6 +40,7 @@ Documentation for rhash
%ifarch sw_64 %ifarch sw_64
%patch1 -p1 %patch1 -p1
%endif %endif
%patch2 -p1
sed -i -e '/^INSTALL_SHARED/s/644/755/' librhash/Makefile sed -i -e '/^INSTALL_SHARED/s/644/755/' librhash/Makefile
%build %build
@ -71,6 +73,9 @@ make test-shared
%{_mandir}/man1/*.1* %{_mandir}/man1/*.1*
%changelog %changelog
* Fri Jan 6 2023 caofei<caofei@xfusion.com> - 1.4.2-4
- fix incorrect total message in check-embedded mode
* Tue Oct 25 2022 wuzx<wuzx1226@qq.com> - 1.4.2-3 * Tue Oct 25 2022 wuzx<wuzx1226@qq.com> - 1.4.2-3
- Add sw64 architecture - Add sw64 architecture