Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324437
b: refs/heads/master
c: 6bb22fe
h: refs/heads/master
i:
  324435: 4379c91
v: v3
  • Loading branch information
Ben Hutchings authored and Greg Kroah-Hartman committed Sep 10, 2012
1 parent 599540a commit 3015452
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d5ab482799e7c4c4b7c0aa67e8710dce28115d03
refs/heads/master: 6bb22fea25624ab593eee376fa5fb82d1b13f45a
22 changes: 11 additions & 11 deletions trunk/tools/hv/hv_kvp_daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static void kvp_acquire_lock(int pool)

if (fcntl(kvp_file_info[pool].fd, F_SETLKW, &fl) == -1) {
syslog(LOG_ERR, "Failed to acquire the lock pool: %d", pool);
exit(-1);
exit(EXIT_FAILURE);
}
}

Expand All @@ -134,7 +134,7 @@ static void kvp_release_lock(int pool)
if (fcntl(kvp_file_info[pool].fd, F_SETLK, &fl) == -1) {
perror("fcntl");
syslog(LOG_ERR, "Failed to release the lock pool: %d", pool);
exit(-1);
exit(EXIT_FAILURE);
}
}

Expand All @@ -153,7 +153,7 @@ static void kvp_update_file(int pool)
if (!filep) {
kvp_release_lock(pool);
syslog(LOG_ERR, "Failed to open file, pool: %d", pool);
exit(-1);
exit(EXIT_FAILURE);
}

bytes_written = fwrite(kvp_file_info[pool].records,
Expand All @@ -179,7 +179,7 @@ static void kvp_update_mem_state(int pool)
if (!filep) {
kvp_release_lock(pool);
syslog(LOG_ERR, "Failed to open file, pool: %d", pool);
exit(-1);
exit(EXIT_FAILURE);
}
while (!feof(filep)) {
readp = &record[records_read];
Expand All @@ -196,7 +196,7 @@ static void kvp_update_mem_state(int pool)

if (record == NULL) {
syslog(LOG_ERR, "malloc failed");
exit(-1);
exit(EXIT_FAILURE);
}
continue;
}
Expand Down Expand Up @@ -225,7 +225,7 @@ static int kvp_file_init(void)
if (access("/var/opt/hyperv", F_OK)) {
if (mkdir("/var/opt/hyperv", S_IRUSR | S_IWUSR | S_IROTH)) {
syslog(LOG_ERR, " Failed to create /var/opt/hyperv");
exit(-1);
exit(EXIT_FAILURE);
}
}

Expand Down Expand Up @@ -1358,13 +1358,13 @@ int main(void)

if (kvp_file_init()) {
syslog(LOG_ERR, "Failed to initialize the pools");
exit(-1);
exit(EXIT_FAILURE);
}

fd = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR);
if (fd < 0) {
syslog(LOG_ERR, "netlink socket creation failed; error:%d", fd);
exit(-1);
exit(EXIT_FAILURE);
}
addr.nl_family = AF_NETLINK;
addr.nl_pad = 0;
Expand All @@ -1376,7 +1376,7 @@ int main(void)
if (error < 0) {
syslog(LOG_ERR, "bind failed; error:%d", error);
close(fd);
exit(-1);
exit(EXIT_FAILURE);
}
sock_opt = addr.nl_groups;
setsockopt(fd, 270, 1, &sock_opt, sizeof(sock_opt));
Expand All @@ -1396,7 +1396,7 @@ int main(void)
if (len < 0) {
syslog(LOG_ERR, "netlink_send failed; error:%d", len);
close(fd);
exit(-1);
exit(EXIT_FAILURE);
}

pfd.fd = fd;
Expand Down Expand Up @@ -1608,7 +1608,7 @@ int main(void)
len = netlink_send(fd, incoming_cn_msg);
if (len < 0) {
syslog(LOG_ERR, "net_link send failed; error:%d", len);
exit(-1);
exit(EXIT_FAILURE);
}
}

Expand Down

0 comments on commit 3015452

Please sign in to comment.