Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/bareos fix TapeAlert bit calculation (off-by ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/f12ac6390175
branches: trunk
changeset: 437326:f12ac6390175
user: kardel <kardel%pkgsrc.org@localhost>
date: Fri Aug 21 06:01:35 2020 +0000
description:
fix TapeAlert bit calculation (off-by one and byte order)
diffstat:
sysutils/bareos/distinfo | 3 +-
sysutils/bareos/patches/patch-core_src_lib_scsi__tapealert.cc | 17 +++++++++++
2 files changed, 19 insertions(+), 1 deletions(-)
diffs (38 lines):
diff -r 252fe130b17c -r f12ac6390175 sysutils/bareos/distinfo
--- a/sysutils/bareos/distinfo Fri Aug 21 01:51:16 2020 +0000
+++ b/sysutils/bareos/distinfo Fri Aug 21 06:01:35 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2020/08/04 12:56:15 kardel Exp $
+$NetBSD: distinfo,v 1.3 2020/08/21 06:01:35 kardel Exp $
SHA1 (bareos-19.2.8.tar.gz) = b26f7db66e108eed1e20b11c36f994456419748e
RMD160 (bareos-19.2.8.tar.gz) = 221777925946ab05ddc00063ba51daf4555f16d1
@@ -31,6 +31,7 @@
SHA1 (patch-core_src_findlib_find__one.cc) = 50eb6d289b7b2a7b33ee5828db31d03169833d9c
SHA1 (patch-core_src_lib_mem__pool.cc) = 16b5adc4a5b2b4fd542b4d330e03283b8994a4a7
SHA1 (patch-core_src_lib_scsi__lli.cc) = 09aa887d71009baa2ce2203c46c88a89097d6546
+SHA1 (patch-core_src_lib_scsi__tapealert.cc) = 11feff157ec8abbbbf689eed9aecd15b336fb28e
SHA1 (patch-core_src_lib_version.c) = edfd88aed983ea3ce1ead6846707b5625ad5fc51
SHA1 (patch-core_src_lmdb_mdb.c) = 6cb69f975c23ec5ae52eb1daa8f6f73b7cbf71fd
SHA1 (patch-core_src_plugins_stored_scsicrypto-sd.cc) = d59125fd445536e220140acf16e43605a4a98e9c
diff -r 252fe130b17c -r f12ac6390175 sysutils/bareos/patches/patch-core_src_lib_scsi__tapealert.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/bareos/patches/patch-core_src_lib_scsi__tapealert.cc Fri Aug 21 06:01:35 2020 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-core_src_lib_scsi__tapealert.cc,v 1.1 2020/08/21 06:01:36 kardel Exp $
+
+ fix result bit setting by keeping the uint64_t type and
+ not trip over endian issues and off by one errors for
+ result_index == 64.
+
+--- core/src/lib/scsi_tapealert.cc.orig 2020-08-20 16:04:40.584902268 +0000
++++ core/src/lib/scsi_tapealert.cc
+@@ -172,7 +172,7 @@ bool GetTapealertFlags(int fd, const cha
+ if (result_index == tapealert_mappings[j].flag) {
+ Dmsg2(100, "TapeAlert [%d] set ==> %s\n", result_index,
+ tapealert_mappings[j].alert_msg);
+- SetBit(result_index, (char*)flags);
++ *flags |= 1UL << (result_index - 1);
+ }
+ }
+ }
Home |
Main Index |
Thread Index |
Old Index