diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-13 15:11:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-13 15:11:01 -0500 |
commit | b78b499a67c3f77aeb6cd0b54724bc38b141255d (patch) | |
tree | 8ebdb5303bb1552577182d9fe4086910b8648d22 /tools | |
parent | 098c30557a9a19827240aaadc137e4668157dc6b (diff) | |
parent | 190cc65e912de7e8f7ebddcecfbf55a610281a8c (diff) |
Merge tag 'char-misc-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver updates from Greg KH:
"Here's the big char/misc driver patches for 4.10-rc1. Lots of tiny
changes over lots of "minor" driver subsystems, the largest being some
new FPGA drivers. Other than that, a few other new drivers, but no new
driver subsystems added for this kernel cycle, a nice change.
All of these have been in linux-next with no reported issues"
* tag 'char-misc-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (107 commits)
uio-hv-generic: store physical addresses instead of virtual
Tools: hv: kvp: configurable external scripts path
uio-hv-generic: new userspace i/o driver for VMBus
vmbus: add support for dynamic device id's
hv: change clockevents unbind tactics
hv: acquire vmbus_connection.channel_mutex in vmbus_free_channels()
hyperv: Fix spelling of HV_UNKOWN
mei: bus: enable non-blocking RX
mei: fix the back to back interrupt handling
mei: synchronize irq before initiating a reset.
VME: Remove shutdown entry from vme_driver
auxdisplay: ht16k33: select framebuffer helper modules
MAINTAINERS: add git url for fpga
fpga: Clarify how write_init works streaming modes
fpga zynq: Fix incorrect ISR state on bootup
fpga zynq: Remove priv->dev
fpga zynq: Add missing \n to messages
fpga: Add COMPILE_TEST to all drivers
uio: pruss: add clk_disable()
char/pcmcia: add some error checking in scr24x_read()
...
Diffstat (limited to 'tools')
-rw-r--r-- | tools/hv/Makefile | 3 | ||||
-rw-r--r-- | tools/hv/hv_fcopy_daemon.c | 7 | ||||
-rw-r--r-- | tools/hv/hv_kvp_daemon.c | 20 |
3 files changed, 10 insertions, 20 deletions
diff --git a/tools/hv/Makefile b/tools/hv/Makefile index a8c4644022a6..0d1e61b81844 100644 --- a/tools/hv/Makefile +++ b/tools/hv/Makefile | |||
@@ -1,9 +1,8 @@ | |||
1 | # Makefile for Hyper-V tools | 1 | # Makefile for Hyper-V tools |
2 | 2 | ||
3 | CC = $(CROSS_COMPILE)gcc | 3 | CC = $(CROSS_COMPILE)gcc |
4 | PTHREAD_LIBS = -lpthread | ||
5 | WARNINGS = -Wall -Wextra | 4 | WARNINGS = -Wall -Wextra |
6 | CFLAGS = $(WARNINGS) -g $(PTHREAD_LIBS) $(shell getconf LFS_CFLAGS) | 5 | CFLAGS = $(WARNINGS) -g $(shell getconf LFS_CFLAGS) |
7 | 6 | ||
8 | CFLAGS += -D__EXPORTED_HEADERS__ -I../../include/uapi -I../../include | 7 | CFLAGS += -D__EXPORTED_HEADERS__ -I../../include/uapi -I../../include |
9 | 8 | ||
diff --git a/tools/hv/hv_fcopy_daemon.c b/tools/hv/hv_fcopy_daemon.c index fdc9ca4c0356..26ae609a9448 100644 --- a/tools/hv/hv_fcopy_daemon.c +++ b/tools/hv/hv_fcopy_daemon.c | |||
@@ -18,21 +18,14 @@ | |||
18 | 18 | ||
19 | 19 | ||
20 | #include <sys/types.h> | 20 | #include <sys/types.h> |
21 | #include <sys/socket.h> | ||
22 | #include <sys/poll.h> | ||
23 | #include <linux/types.h> | ||
24 | #include <linux/kdev_t.h> | ||
25 | #include <stdio.h> | 21 | #include <stdio.h> |
26 | #include <stdlib.h> | 22 | #include <stdlib.h> |
27 | #include <unistd.h> | 23 | #include <unistd.h> |
28 | #include <string.h> | ||
29 | #include <ctype.h> | ||
30 | #include <errno.h> | 24 | #include <errno.h> |
31 | #include <linux/hyperv.h> | 25 | #include <linux/hyperv.h> |
32 | #include <syslog.h> | 26 | #include <syslog.h> |
33 | #include <sys/stat.h> | 27 | #include <sys/stat.h> |
34 | #include <fcntl.h> | 28 | #include <fcntl.h> |
35 | #include <dirent.h> | ||
36 | #include <getopt.h> | 29 | #include <getopt.h> |
37 | 30 | ||
38 | static int target_fd; | 31 | static int target_fd; |
diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c index bc7adb84e679..f1758fcbc37d 100644 --- a/tools/hv/hv_kvp_daemon.c +++ b/tools/hv/hv_kvp_daemon.c | |||
@@ -22,8 +22,6 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | 24 | ||
25 | #include <sys/types.h> | ||
26 | #include <sys/socket.h> | ||
27 | #include <sys/poll.h> | 25 | #include <sys/poll.h> |
28 | #include <sys/utsname.h> | 26 | #include <sys/utsname.h> |
29 | #include <stdio.h> | 27 | #include <stdio.h> |
@@ -34,7 +32,6 @@ | |||
34 | #include <errno.h> | 32 | #include <errno.h> |
35 | #include <arpa/inet.h> | 33 | #include <arpa/inet.h> |
36 | #include <linux/hyperv.h> | 34 | #include <linux/hyperv.h> |
37 | #include <linux/netlink.h> | ||
38 | #include <ifaddrs.h> | 35 | #include <ifaddrs.h> |
39 | #include <netdb.h> | 36 | #include <netdb.h> |
40 | #include <syslog.h> | 37 | #include <syslog.h> |
@@ -96,13 +93,13 @@ static struct utsname uts_buf; | |||
96 | 93 | ||
97 | #define KVP_CONFIG_LOC "/var/lib/hyperv" | 94 | #define KVP_CONFIG_LOC "/var/lib/hyperv" |
98 | 95 | ||
96 | #ifndef KVP_SCRIPTS_PATH | ||
97 | #define KVP_SCRIPTS_PATH "/usr/libexec/hypervkvpd/" | ||
98 | #endif | ||
99 | |||
99 | #define MAX_FILE_NAME 100 | 100 | #define MAX_FILE_NAME 100 |
100 | #define ENTRIES_PER_BLOCK 50 | 101 | #define ENTRIES_PER_BLOCK 50 |
101 | 102 | ||
102 | #ifndef SOL_NETLINK | ||
103 | #define SOL_NETLINK 270 | ||
104 | #endif | ||
105 | |||
106 | struct kvp_record { | 103 | struct kvp_record { |
107 | char key[HV_KVP_EXCHANGE_MAX_KEY_SIZE]; | 104 | char key[HV_KVP_EXCHANGE_MAX_KEY_SIZE]; |
108 | char value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE]; | 105 | char value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE]; |
@@ -702,7 +699,7 @@ static char *kvp_mac_to_if_name(char *mac) | |||
702 | if (dir == NULL) | 699 | if (dir == NULL) |
703 | return NULL; | 700 | return NULL; |
704 | 701 | ||
705 | snprintf(dev_id, sizeof(dev_id), kvp_net_dir); | 702 | snprintf(dev_id, sizeof(dev_id), "%s", kvp_net_dir); |
706 | q = dev_id + strlen(kvp_net_dir); | 703 | q = dev_id + strlen(kvp_net_dir); |
707 | 704 | ||
708 | while ((entry = readdir(dir)) != NULL) { | 705 | while ((entry = readdir(dir)) != NULL) { |
@@ -825,7 +822,7 @@ static void kvp_get_ipconfig_info(char *if_name, | |||
825 | * . | 822 | * . |
826 | */ | 823 | */ |
827 | 824 | ||
828 | sprintf(cmd, "%s", "hv_get_dns_info"); | 825 | sprintf(cmd, KVP_SCRIPTS_PATH "%s", "hv_get_dns_info"); |
829 | 826 | ||
830 | /* | 827 | /* |
831 | * Execute the command to gather DNS info. | 828 | * Execute the command to gather DNS info. |
@@ -842,7 +839,7 @@ static void kvp_get_ipconfig_info(char *if_name, | |||
842 | * Enabled: DHCP enabled. | 839 | * Enabled: DHCP enabled. |
843 | */ | 840 | */ |
844 | 841 | ||
845 | sprintf(cmd, "%s %s", "hv_get_dhcp_info", if_name); | 842 | sprintf(cmd, KVP_SCRIPTS_PATH "%s %s", "hv_get_dhcp_info", if_name); |
846 | 843 | ||
847 | file = popen(cmd, "r"); | 844 | file = popen(cmd, "r"); |
848 | if (file == NULL) | 845 | if (file == NULL) |
@@ -1348,7 +1345,8 @@ static int kvp_set_ip_info(char *if_name, struct hv_kvp_ipaddr_value *new_val) | |||
1348 | * invoke the external script to do its magic. | 1345 | * invoke the external script to do its magic. |
1349 | */ | 1346 | */ |
1350 | 1347 | ||
1351 | snprintf(cmd, sizeof(cmd), "%s %s", "hv_set_ifconfig", if_file); | 1348 | snprintf(cmd, sizeof(cmd), KVP_SCRIPTS_PATH "%s %s", |
1349 | "hv_set_ifconfig", if_file); | ||
1352 | if (system(cmd)) { | 1350 | if (system(cmd)) { |
1353 | syslog(LOG_ERR, "Failed to execute cmd '%s'; error: %d %s", | 1351 | syslog(LOG_ERR, "Failed to execute cmd '%s'; error: %d %s", |
1354 | cmd, errno, strerror(errno)); | 1352 | cmd, errno, strerror(errno)); |