From 000b45a806116f660649e37df80000fd55b334cc Mon Sep 17 00:00:00 2001 From: John Hodge Date: Mon, 15 Jul 2013 10:16:04 +0800 Subject: [PATCH] Usermode/dhcpclient - Added echo of error string when write fails --- Usermode/Applications/dhcpclient_src/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Usermode/Applications/dhcpclient_src/main.c b/Usermode/Applications/dhcpclient_src/main.c index ff326b03..5fc0be4b 100644 --- a/Usermode/Applications/dhcpclient_src/main.c +++ b/Usermode/Applications/dhcpclient_src/main.c @@ -8,6 +8,7 @@ #include #include #include +#include enum { UDP_IOCTL_GETSETLPORT = 4, @@ -316,7 +317,8 @@ void Send_DHCPDISCOVER(tInterface *Iface) i = _SysWrite(Iface->SocketFD, data, sizeof(data)); if( i != sizeof(data) ) { - _SysDebug("_SysWrite failed (%i != %i)", i, sizeof(data)); + _SysDebug("_SysWrite failed (%i != %i): %s", i, sizeof(data), + strerror(errno)); } Update_State(Iface, STATE_DISCOVER_SENT); } -- 2.20.1