fix incorrect total message in check-embedded mode

Signed-off-by: cao-fei8 <caofei@xfusion.com>
This commit is contained in:
cao-fei8 2023-01-06 14:24:20 +08:00
parent 8a287af91b
commit c4375bfd78
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,11 +1,13 @@
Name: rhash
Version: 1.4.2
Release: 1
Release: 2
Summary: Great utility for computing hash sums
License: MIT
URL: https://github.com/rhash/RHash
Source0: https://github.com/rhash/RHash/archive/v%{version}/rhash-%{version}.tar.gz
Patch1: 0001-fix-incorrect-total-message-in-check-embedded-mode.patch
BuildRequires: gcc
%description
@ -63,6 +65,9 @@ make test-shared
%{_mandir}/man1/*.1*
%changelog
* Fri Jan 6 2023 caofei <caofei@xfusion.com> - 1.4.2-2
- fix incorrect total message in check-embedded mode
* Wed Dec 29 2021 zoulin <zoulin13@huawei.com> - 1.4.2-1
- Upgrade to 1.4.2