* [PATCH 1/3] tools: hv: remove unnecessary link flag
@ 2016-10-19 10:06 Weibing Zhang
2016-10-19 10:06 ` [PATCH 2/3] tools: hv: fix a compile warning in snprintf Weibing Zhang
2016-10-19 10:06 ` [PATCH 3/3] tools: hv: remove unnecessary header files and netlink related code Weibing Zhang
0 siblings, 2 replies; 3+ messages in thread
From: Weibing Zhang @ 2016-10-19 10:06 UTC (permalink / raw)
To: kys, haiyangz; +Cc: devel, linux-kernel, Weibing Zhang
The link flag pthread is not needed.
Signed-off-by: Weibing Zhang <atheism.zhang@gmail.com>
---
tools/hv/Makefile | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/hv/Makefile b/tools/hv/Makefile
index a8c4644..0d1e61b 100644
--- a/tools/hv/Makefile
+++ b/tools/hv/Makefile
@@ -1,9 +1,8 @@
# Makefile for Hyper-V tools
CC = $(CROSS_COMPILE)gcc
-PTHREAD_LIBS = -lpthread
WARNINGS = -Wall -Wextra
-CFLAGS = $(WARNINGS) -g $(PTHREAD_LIBS) $(shell getconf LFS_CFLAGS)
+CFLAGS = $(WARNINGS) -g $(shell getconf LFS_CFLAGS)
CFLAGS += -D__EXPORTED_HEADERS__ -I../../include/uapi -I../../include
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/3] tools: hv: fix a compile warning in snprintf
2016-10-19 10:06 [PATCH 1/3] tools: hv: remove unnecessary link flag Weibing Zhang
@ 2016-10-19 10:06 ` Weibing Zhang
2016-10-19 10:06 ` [PATCH 3/3] tools: hv: remove unnecessary header files and netlink related code Weibing Zhang
1 sibling, 0 replies; 3+ messages in thread
From: Weibing Zhang @ 2016-10-19 10:06 UTC (permalink / raw)
To: kys, haiyangz; +Cc: devel, linux-kernel, Weibing Zhang
hv_kvp_daemon.c: In function ‘kvp_mac_to_if_name’:
hv_kvp_daemon.c:705:2: warning: format not a string literal and no format arguments [-Wformat-security]
snprintf(dev_id, sizeof(dev_id), kvp_net_dir);
^
hv_kvp_daemon.c:705:2: warning: format not a string literal and no format arguments [-Wformat-security]
Signed-off-by: Weibing Zhang <atheism.zhang@gmail.com>
---
tools/hv/hv_kvp_daemon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
index bc7adb8..bb0719b 100644
--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -702,7 +702,7 @@ static char *kvp_mac_to_if_name(char *mac)
if (dir == NULL)
return NULL;
- snprintf(dev_id, sizeof(dev_id), kvp_net_dir);
+ snprintf(dev_id, sizeof(dev_id), "%s", kvp_net_dir);
q = dev_id + strlen(kvp_net_dir);
while ((entry = readdir(dir)) != NULL) {
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 3/3] tools: hv: remove unnecessary header files and netlink related code
2016-10-19 10:06 [PATCH 1/3] tools: hv: remove unnecessary link flag Weibing Zhang
2016-10-19 10:06 ` [PATCH 2/3] tools: hv: fix a compile warning in snprintf Weibing Zhang
@ 2016-10-19 10:06 ` Weibing Zhang
1 sibling, 0 replies; 3+ messages in thread
From: Weibing Zhang @ 2016-10-19 10:06 UTC (permalink / raw)
To: kys, haiyangz; +Cc: devel, linux-kernel, Weibing Zhang
Remove unnecessary header files and netlink related code as the daemons
do not use netlink to communicate with the kernel now.
Signed-off-by: Weibing Zhang <atheism.zhang@gmail.com>
---
tools/hv/hv_fcopy_daemon.c | 7 -------
tools/hv/hv_kvp_daemon.c | 7 -------
2 files changed, 14 deletions(-)
diff --git a/tools/hv/hv_fcopy_daemon.c b/tools/hv/hv_fcopy_daemon.c
index fdc9ca4..26ae609 100644
--- a/tools/hv/hv_fcopy_daemon.c
+++ b/tools/hv/hv_fcopy_daemon.c
@@ -18,21 +18,14 @@
#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/poll.h>
-#include <linux/types.h>
-#include <linux/kdev_t.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#include <string.h>
-#include <ctype.h>
#include <errno.h>
#include <linux/hyperv.h>
#include <syslog.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <dirent.h>
#include <getopt.h>
static int target_fd;
diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
index bb0719b..d791dbf 100644
--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -22,8 +22,6 @@
*/
-#include <sys/types.h>
-#include <sys/socket.h>
#include <sys/poll.h>
#include <sys/utsname.h>
#include <stdio.h>
@@ -34,7 +32,6 @@
#include <errno.h>
#include <arpa/inet.h>
#include <linux/hyperv.h>
-#include <linux/netlink.h>
#include <ifaddrs.h>
#include <netdb.h>
#include <syslog.h>
@@ -99,10 +96,6 @@ static struct utsname uts_buf;
#define MAX_FILE_NAME 100
#define ENTRIES_PER_BLOCK 50
-#ifndef SOL_NETLINK
-#define SOL_NETLINK 270
-#endif
-
struct kvp_record {
char key[HV_KVP_EXCHANGE_MAX_KEY_SIZE];
char value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE];
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-19 16:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-19 10:06 [PATCH 1/3] tools: hv: remove unnecessary link flag Weibing Zhang
2016-10-19 10:06 ` [PATCH 2/3] tools: hv: fix a compile warning in snprintf Weibing Zhang
2016-10-19 10:06 ` [PATCH 3/3] tools: hv: remove unnecessary header files and netlink related code Weibing Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome