mirror of
https://github.com/reactos/reactos.git
synced 2025-04-26 00:20:34 +00:00
Merge 40118 from amd64-branch:
%m is a glibc extension, convert it to "%s", strerror(errno). and fix 64bit build of dhcp service (Samuel Serapión) svn path=/trunk/; revision=40736
This commit is contained in:
parent
f957e3e92f
commit
107be66741
2 changed files with 13 additions and 13 deletions
|
@ -606,7 +606,7 @@ bind_lease(struct interface_info *ip)
|
||||||
|
|
||||||
note("bound to %s -- renewal in %ld seconds.",
|
note("bound to %s -- renewal in %ld seconds.",
|
||||||
piaddr(ip->client->active->address),
|
piaddr(ip->client->active->address),
|
||||||
ip->client->active->renewal - cur_time);
|
(long int)(ip->client->active->renewal - cur_time));
|
||||||
|
|
||||||
ip->client->state = S_BOUND;
|
ip->client->state = S_BOUND;
|
||||||
|
|
||||||
|
@ -1035,7 +1035,7 @@ send_discover(void *ipp)
|
||||||
|
|
||||||
note("DHCPDISCOVER on %s to %s port %d interval %ld",
|
note("DHCPDISCOVER on %s to %s port %d interval %ld",
|
||||||
ip->name, inet_ntoa(sockaddr_broadcast.sin_addr),
|
ip->name, inet_ntoa(sockaddr_broadcast.sin_addr),
|
||||||
ntohs(sockaddr_broadcast.sin_port), ip->client->interval);
|
ntohs(sockaddr_broadcast.sin_port), (long int)ip->client->interval);
|
||||||
|
|
||||||
/* Send out a packet. */
|
/* Send out a packet. */
|
||||||
(void)send_packet(ip, &ip->client->packet, ip->client->packet_length,
|
(void)send_packet(ip, &ip->client->packet, ip->client->packet_length,
|
||||||
|
@ -1088,8 +1088,8 @@ state_panic(void *ipp)
|
||||||
ip->client->active->renewal) {
|
ip->client->active->renewal) {
|
||||||
ip->client->state = S_BOUND;
|
ip->client->state = S_BOUND;
|
||||||
note("bound: renewal in %ld seconds.",
|
note("bound: renewal in %ld seconds.",
|
||||||
ip->client->active->renewal -
|
(long int)(ip->client->active->renewal -
|
||||||
cur_time);
|
cur_time));
|
||||||
add_timeout(
|
add_timeout(
|
||||||
ip->client->active->renewal,
|
ip->client->active->renewal,
|
||||||
state_bound, ip);
|
state_bound, ip);
|
||||||
|
@ -1563,7 +1563,7 @@ rewrite_client_leases(void)
|
||||||
if (!leaseFile) {
|
if (!leaseFile) {
|
||||||
leaseFile = fopen(path_dhclient_db, "w");
|
leaseFile = fopen(path_dhclient_db, "w");
|
||||||
if (!leaseFile)
|
if (!leaseFile)
|
||||||
error("can't create %s: %m", path_dhclient_db);
|
error("can't create %s: %s", path_dhclient_db, strerror(errno));
|
||||||
} else {
|
} else {
|
||||||
fflush(leaseFile);
|
fflush(leaseFile);
|
||||||
rewind(leaseFile);
|
rewind(leaseFile);
|
||||||
|
@ -1600,7 +1600,7 @@ write_client_lease(struct interface_info *ip, struct client_lease *lease,
|
||||||
if (!leaseFile) { /* XXX */
|
if (!leaseFile) { /* XXX */
|
||||||
leaseFile = fopen(path_dhclient_db, "w");
|
leaseFile = fopen(path_dhclient_db, "w");
|
||||||
if (!leaseFile)
|
if (!leaseFile)
|
||||||
error("can't create %s: %m", path_dhclient_db);
|
error("can't create %s: %s", path_dhclient_db, strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(leaseFile, "lease {\n");
|
fprintf(leaseFile, "lease {\n");
|
||||||
|
@ -1655,7 +1655,7 @@ script_init(char *reason, struct string_list *medium)
|
||||||
sizeof(size_t) + strlen(reason);
|
sizeof(size_t) + strlen(reason);
|
||||||
|
|
||||||
if ((buf = buf_open(hdr.len)) == NULL)
|
if ((buf = buf_open(hdr.len)) == NULL)
|
||||||
error("buf_open: %m");
|
error("buf_open: %s", strerror(errno));
|
||||||
|
|
||||||
errs = 0;
|
errs = 0;
|
||||||
errs += buf_add(buf, &hdr, sizeof(hdr));
|
errs += buf_add(buf, &hdr, sizeof(hdr));
|
||||||
|
@ -1667,10 +1667,10 @@ script_init(char *reason, struct string_list *medium)
|
||||||
errs += buf_add(buf, reason, len);
|
errs += buf_add(buf, reason, len);
|
||||||
|
|
||||||
if (errs)
|
if (errs)
|
||||||
error("buf_add: %m");
|
error("buf_add: %s", strerror(errno));
|
||||||
|
|
||||||
if (buf_close(privfd, buf) == -1)
|
if (buf_close(privfd, buf) == -1)
|
||||||
error("buf_close: %m");
|
error("buf_close: %s", strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1848,7 +1848,7 @@ script_write_params(char *prefix, struct client_lease *lease)
|
||||||
scripttime = time(NULL);
|
scripttime = time(NULL);
|
||||||
|
|
||||||
if ((buf = buf_open(hdr.len)) == NULL)
|
if ((buf = buf_open(hdr.len)) == NULL)
|
||||||
error("buf_open: %m");
|
error("buf_open: %s", strerror(errno));
|
||||||
|
|
||||||
errs = 0;
|
errs = 0;
|
||||||
errs += buf_add(buf, &hdr, sizeof(hdr));
|
errs += buf_add(buf, &hdr, sizeof(hdr));
|
||||||
|
@ -1868,10 +1868,10 @@ script_write_params(char *prefix, struct client_lease *lease)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (errs)
|
if (errs)
|
||||||
error("buf_add: %m");
|
error("buf_add: %s", strerror(errno));
|
||||||
|
|
||||||
if (buf_close(privfd, buf) == -1)
|
if (buf_close(privfd, buf) == -1)
|
||||||
error("buf_close: %m");
|
error("buf_close: %s", strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -186,7 +186,7 @@ dispatch(void)
|
||||||
time(&cur_time);
|
time(&cur_time);
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
error("poll: %m");
|
error("poll: %s", strerror(errno));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue