Accepting request 282930 from Virtualization
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/282930 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/hyper-v?expand=0&rev=29
This commit is contained in:
commit
f209ea400f
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 12 09:37:40 UTC 2015 - ohering@suse.de
|
||||
|
||||
- Check return value of setsockopt call
|
||||
- Improve error logging in VSS daemon.
|
||||
- Check return value of poll call
|
||||
- Properly pack the data for file copy functionality
|
||||
- make struct hv_do_fcopy match Hyper-V host messages
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 17 09:06:33 UTC 2014 - ohering@suse.de
|
||||
|
||||
@ -9,7 +18,7 @@ Wed Dec 17 09:06:33 UTC 2014 - ohering@suse.de
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 25 17:46:30 UTC 2014 - ohering@suse.de
|
||||
|
||||
- introduce -n/--no-daemon option (fate#317317533)
|
||||
- introduce -n/--no-daemon option (fate#317533)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 09 04:39:00 UTC 2014 - Led <ledest@gmail.com>
|
||||
|
@ -128,10 +128,11 @@ struct hv_start_fcopy {
|
||||
|
||||
struct hv_do_fcopy {
|
||||
struct hv_fcopy_hdr hdr;
|
||||
__u32 pad;
|
||||
__u64 offset;
|
||||
__u32 size;
|
||||
__u8 data[DATA_FRAGMENT];
|
||||
};
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
/*
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package hyper-v
|
||||
#
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
|
@ -174,7 +174,7 @@ int main(int argc, char *argv[])
|
||||
fcopy_fd = open("/dev/vmbus/hv_fcopy", O_RDWR);
|
||||
|
||||
if (fcopy_fd < 0) {
|
||||
syslog(LOG_ERR, "open /dev/hv_fcopy failed; error: %d %s",
|
||||
syslog(LOG_ERR, "open /dev/vmbus/hv_fcopy failed; error: %d %s",
|
||||
errno, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -1485,7 +1485,7 @@ int main(int argc, char *argv[])
|
||||
kvp_get_os_info();
|
||||
/*
|
||||
* Cache Fully Qualified Domain Name because getaddrinfo takes an
|
||||
* unpredicatable amount of time to finish.
|
||||
* unpredictable amount of time to finish.
|
||||
*/
|
||||
kvp_get_domain_name(full_domain_name, sizeof(full_domain_name));
|
||||
|
||||
|
@ -221,7 +221,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
fd = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR);
|
||||
if (fd < 0) {
|
||||
syslog(LOG_ERR, "netlink socket creation failed; error:%d", fd);
|
||||
syslog(LOG_ERR, "netlink socket creation failed; error:%d %s",
|
||||
errno, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
addr.nl_family = AF_NETLINK;
|
||||
@ -232,12 +233,16 @@ int main(int argc, char *argv[])
|
||||
|
||||
error = bind(fd, (struct sockaddr *)&addr, sizeof(addr));
|
||||
if (error < 0) {
|
||||
syslog(LOG_ERR, "bind failed; error:%d", error);
|
||||
syslog(LOG_ERR, "bind failed; error:%d %s", errno, strerror(errno));
|
||||
close(fd);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
nl_group = CN_VSS_IDX;
|
||||
setsockopt(fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, &nl_group, sizeof(nl_group));
|
||||
if (setsockopt(fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, &nl_group, sizeof(nl_group)) < 0) {
|
||||
syslog(LOG_ERR, "setsockopt failed; error:%d %s", errno, strerror(errno));
|
||||
close(fd);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
/*
|
||||
* Register ourselves with the kernel.
|
||||
*/
|
||||
@ -252,7 +257,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
len = netlink_send(fd, message);
|
||||
if (len < 0) {
|
||||
syslog(LOG_ERR, "netlink_send failed; error:%d", len);
|
||||
syslog(LOG_ERR, "netlink_send failed; error:%d %s", errno, strerror(errno));
|
||||
close(fd);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
@ -264,7 +269,16 @@ int main(int argc, char *argv[])
|
||||
socklen_t addr_l = sizeof(addr);
|
||||
pfd.events = POLLIN;
|
||||
pfd.revents = 0;
|
||||
poll(&pfd, 1, -1);
|
||||
|
||||
if (poll(&pfd, 1, -1) < 0) {
|
||||
syslog(LOG_ERR, "poll failed; error:%d %s", errno, strerror(errno));
|
||||
if (errno == EINVAL) {
|
||||
close(fd);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
len = recvfrom(fd, vss_recv_buffer, vss_recv_buffer_len, 0,
|
||||
addr_p, &addr_l);
|
||||
@ -314,7 +328,8 @@ int main(int argc, char *argv[])
|
||||
vss_msg->error = error;
|
||||
len = netlink_send(fd, incoming_cn_msg);
|
||||
if (len < 0) {
|
||||
syslog(LOG_ERR, "net_link send failed; error:%d", len);
|
||||
syslog(LOG_ERR, "net_link send failed; error:%d %s",
|
||||
errno, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user