Author: sserapion
Date: Fri Mar 20 09:33:05 2009
New Revision: 40118
URL:
http://svn.reactos.org/svn/reactos?rev=40118&view=rev
Log:
%m is a glibc extension, convert it to "%s", strerror(errno). and fix 64bit
build of dhcp service
Modified:
branches/ros-amd64-bringup/reactos/base/services/dhcp/dhclient.c
branches/ros-amd64-bringup/reactos/base/services/dhcp/dispatch.c
Modified: branches/ros-amd64-bringup/reactos/base/services/dhcp/dhclient.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
==============================================================================
--- branches/ros-amd64-bringup/reactos/base/services/dhcp/dhclient.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/base/services/dhcp/dhclient.c [iso-8859-1] Fri Mar
20 09:33:05 2009
@@ -606,7 +606,7 @@
note("bound to %s -- renewal in %ld seconds.",
piaddr(ip->client->active->address),
- ip->client->active->renewal - cur_time);
+ (long int)(ip->client->active->renewal - cur_time));
ip->client->state = S_BOUND;
@@ -1035,7 +1035,7 @@
note("DHCPDISCOVER on %s to %s port %d interval %ld",
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. */
(void)send_packet(ip, &ip->client->packet, ip->client->packet_length,
@@ -1088,8 +1088,8 @@
ip->client->active->renewal) {
ip->client->state = S_BOUND;
note("bound: renewal in %ld seconds.",
- ip->client->active->renewal -
- cur_time);
+ (long int)(ip->client->active->renewal -
+ cur_time));
add_timeout(
ip->client->active->renewal,
state_bound, ip);
@@ -1563,7 +1563,7 @@
if (!leaseFile) {
leaseFile = fopen(path_dhclient_db, "w");
if (!leaseFile)
- error("can't create %s: %m", path_dhclient_db);
+ error("can't create %s: %s", path_dhclient_db, strerror(errno));
} else {
fflush(leaseFile);
rewind(leaseFile);
@@ -1600,7 +1600,7 @@
if (!leaseFile) { /* XXX */
leaseFile = fopen(path_dhclient_db, "w");
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");
@@ -1655,7 +1655,7 @@
sizeof(size_t) + strlen(reason);
if ((buf = buf_open(hdr.len)) == NULL)
- error("buf_open: %m");
+ error("buf_open: %s", strerror(errno));
errs = 0;
errs += buf_add(buf, &hdr, sizeof(hdr));
@@ -1667,10 +1667,10 @@
errs += buf_add(buf, reason, len);
if (errs)
- error("buf_add: %m");
+ error("buf_add: %s", strerror(errno));
if (buf_close(privfd, buf) == -1)
- error("buf_close: %m");
+ error("buf_close: %s", strerror(errno));
}
void
@@ -1848,7 +1848,7 @@
scripttime = time(NULL);
if ((buf = buf_open(hdr.len)) == NULL)
- error("buf_open: %m");
+ error("buf_open: %s", strerror(errno));
errs = 0;
errs += buf_add(buf, &hdr, sizeof(hdr));
@@ -1868,10 +1868,10 @@
}
if (errs)
- error("buf_add: %m");
+ error("buf_add: %s", strerror(errno));
if (buf_close(privfd, buf) == -1)
- error("buf_close: %m");
+ error("buf_close: %s", strerror(errno));
}
int
Modified: branches/ros-amd64-bringup/reactos/base/services/dhcp/dispatch.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
==============================================================================
--- branches/ros-amd64-bringup/reactos/base/services/dhcp/dispatch.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/base/services/dhcp/dispatch.c [iso-8859-1] Fri Mar
20 09:33:05 2009
@@ -186,7 +186,7 @@
time(&cur_time);
continue;
} else {
- error("poll: %m");
+ error("poll: %s", strerror(errno));
break;
}
}