!1 isulad-tools: remove securec functions
Merge pull request !1 from openEuler-iSula/master
This commit is contained in:
commit
b34d4f9e3a
@ -4,7 +4,7 @@
|
|||||||
#Basic Information
|
#Basic Information
|
||||||
Name: isulad-tools
|
Name: isulad-tools
|
||||||
Version: v0.9
|
Version: v0.9
|
||||||
Release: 33
|
Release: 34
|
||||||
Summary: isulad tools for IT, work with iSulad
|
Summary: isulad tools for IT, work with iSulad
|
||||||
License: Mulan PSL v1
|
License: Mulan PSL v1
|
||||||
Source0: %{name}-src.tar.gz
|
Source0: %{name}-src.tar.gz
|
||||||
@ -13,7 +13,6 @@ BuildRoot: %{_tmppath}/%{name}-root
|
|||||||
#Dependency
|
#Dependency
|
||||||
BuildRequires: glibc-static
|
BuildRequires: glibc-static
|
||||||
BuildRequires: golang > 1.6
|
BuildRequires: golang > 1.6
|
||||||
BuildRequires: libsecurec libsecurec-devel
|
|
||||||
Requires: iSulad
|
Requires: iSulad
|
||||||
Requires: util-linux
|
Requires: util-linux
|
||||||
|
|
||||||
@ -108,6 +107,12 @@ chmod 0640 ${HOOK_SPEC}/hookspec.json
|
|||||||
rm -rfv %{buildroot}
|
rm -rfv %{buildroot}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 26 2019 Zhangsong<zhangsong34@huawei.com> - 0.9.34
|
||||||
|
- Type:enhancement
|
||||||
|
- ID:NA
|
||||||
|
- SUG:restart
|
||||||
|
- DESC:remove securec functions
|
||||||
|
|
||||||
* Tue Dec 11 2018 Zhangsong<zhangsong34@huawei.com> - 0.9.9-1
|
* Tue Dec 11 2018 Zhangsong<zhangsong34@huawei.com> - 0.9.9-1
|
||||||
- Type:enhancement
|
- Type:enhancement
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
@ -15,7 +15,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <securec.h>
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
@ -35,10 +34,7 @@ int setNetDeviceTSO(int fd, char* name, int on)
|
|||||||
eval.data = on;
|
eval.data = on;
|
||||||
eval.cmd = ETHTOOL_STSO;
|
eval.cmd = ETHTOOL_STSO;
|
||||||
|
|
||||||
ret = strncpy_s(ifr.ifr_name, sizeof(ifr.ifr_name), name, sizeof(ifr.ifr_name) - 1);
|
strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name) - 1);
|
||||||
if (ret != EOK) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
ifr.ifr_data = (void*)&eval;
|
ifr.ifr_data = (void*)&eval;
|
||||||
ret = ioctl(fd, SIOCETHTOOL, &ifr);
|
ret = ioctl(fd, SIOCETHTOOL, &ifr);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
@ -55,10 +51,7 @@ int setNetDeviceSG(int fd, char* name, int on)
|
|||||||
eval.data = on;
|
eval.data = on;
|
||||||
eval.cmd = ETHTOOL_SSG;
|
eval.cmd = ETHTOOL_SSG;
|
||||||
|
|
||||||
ret = strncpy_s(ifr.ifr_name, sizeof(ifr.ifr_name), name, sizeof(ifr.ifr_name) - 1);
|
strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name) - 1);
|
||||||
if (ret != EOK) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
ifr.ifr_data = (void*)&eval;
|
ifr.ifr_data = (void*)&eval;
|
||||||
ret = ioctl(fd, SIOCETHTOOL, &ifr);
|
ret = ioctl(fd, SIOCETHTOOL, &ifr);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
@ -75,10 +68,7 @@ int setNetDeviceTX(int fd, char* name, int on)
|
|||||||
eval.data = on;
|
eval.data = on;
|
||||||
eval.cmd = ETHTOOL_STXCSUM;
|
eval.cmd = ETHTOOL_STXCSUM;
|
||||||
|
|
||||||
ret = strncpy_s(ifr.ifr_name, sizeof(ifr.ifr_name), name, sizeof(ifr.ifr_name) - 1);
|
strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name) - 1);
|
||||||
if (ret != EOK) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
ifr.ifr_data = (void*)&eval;
|
ifr.ifr_data = (void*)&eval;
|
||||||
ret = ioctl(fd, SIOCETHTOOL, &ifr);
|
ret = ioctl(fd, SIOCETHTOOL, &ifr);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user