已开启
target: replace bzero with memset #24
AtomGit-Bot创建于 2024年4月16日
target: replace bzero with memset #24
已开启
从refs/pull/24/head合入到openEuler-20.03-LTS-SP3
共 2 个文件变更+32-1
| @@ -0,0 +1,27 @@ | |||
| 1 | +From d097b2444dba33d312f6cc8fe70889c9e0a4ad34 Mon Sep 17 00:00:00 2001 | ||
| 2 | +From: Rosen Penev <rosenp@gmail.com> | ||
| 3 | +Date: Sat, 15 Aug 2020 15:36:28 -0700 | ||
| 4 | +Subject: [PATCH] target: replace bzero with memset | ||
| 5 | + | ||
| 6 | +bzero is deprecated and replaced witth memset. | ||
| 7 | + | ||
| 8 | +--- | ||
| 9 | + usr/iscsi/target.c | 2 +- | ||
| 10 | + 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 11 | + | ||
| 12 | +diff --git a/usr/iscsi/target.c b/usr/iscsi/target.c | ||
| 13 | +index b2ee8b1..156ab02 100644 | ||
| 14 | +--- a/usr/iscsi/target.c | ||
| 15 | ++++ b/usr/iscsi/target.c | ||
| 16 | +@@ -224,7 +224,7 @@ get_redirect_address(char *callback, char *buffer, int buflen, | ||
| 17 | + { | ||
| 18 | + char *p, *addr, *port; | ||
| 19 | + | ||
| 20 | +- bzero(buffer, buflen); | ||
| 21 | ++ memset(buffer, 0, buflen); | ||
| 22 | + if (call_program(callback, NULL, NULL, buffer, buflen, 0)) | ||
| 23 | + return -1; | ||
| 24 | + | ||
| 25 | +-- | ||
| 26 | +2.27.0 | ||
| 27 | + | ||
| @@ -6,7 +6,7 @@ | |||
| 6 | Summary: The SCSI target daemon and utility programs | 6 | Summary: The SCSI target daemon and utility programs |
| 7 | Name: scsi-target-utils | 7 | Name: scsi-target-utils |
| 8 | Version: 1.0.79 | 8 | Version: 1.0.79 |
| 9 | -Release: 5 | 9 | +Release: 6 |
| 10 | License: GPLv2 | 10 | License: GPLv2 |
| 11 | URL: http://stgt.sourceforge.net/ | 11 | URL: http://stgt.sourceforge.net/ |
| 12 | Source0: https://github.com/fujita/tgt/archive/v%{version}/tgt-v%{version}.tar.gz | 12 | Source0: https://github.com/fujita/tgt/archive/v%{version}/tgt-v%{version}.tar.gz |
| @@ -19,6 +19,7 @@ Patch1: 0002-remove-check-for-xsltproc.patch | |||
| 19 | Patch2: 0003-default-config.patch | 19 | Patch2: 0003-default-config.patch |
| 20 | Patch3: tgt-1.0.79-Adapt-to-glusterfs-api-7.6.3.patch | 20 | Patch3: tgt-1.0.79-Adapt-to-glusterfs-api-7.6.3.patch |
| 21 | Patch4: fix-old-logmsg-lost.patch | 21 | Patch4: fix-old-logmsg-lost.patch |
| 22 | +Patch5: replace-bzero-with-memset.patch | ||
| 22 | 23 | ||
| 23 | BuildRequires: docbook-style-xsl gcc libaio-devel libxslt perl-generators pkgconfig systemd-devel systemd-units | 24 | BuildRequires: docbook-style-xsl gcc libaio-devel libxslt perl-generators pkgconfig systemd-devel systemd-units |
| 24 | %if 0%{?with_rdma} | 25 | %if 0%{?with_rdma} |
| @@ -118,6 +119,9 @@ pushd usr | |||
| 118 | %{_mandir}/man8/* | 119 | %{_mandir}/man8/* |
| 119 | 120 | ||
| 120 | %changelog | 121 | %changelog |
| 122 | +* Tue Apr 16 2024 yanshuai <yanshuai@kylinos.cn> - 1.0.79-6 | ||
| 123 | +- target: replace bzero with memset | ||
| 124 | + | ||
| 121 | * Thu Mar 21 2024 yanshuai <yanshuai@kylinos.cn> - 1.0.79-5 | 125 | * Thu Mar 21 2024 yanshuai <yanshuai@kylinos.cn> - 1.0.79-5 |
| 122 | - fix old logmsg to be lost | 126 | - fix old logmsg to be lost |
| 123 | 127 | ||