From: John Hodge Date: Mon, 15 Jul 2013 02:16:04 +0000 (+0800) Subject: Usermode/dhcpclient - Added echo of error string when write fails X-Git-Tag: rel0.15~351 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=000b45a806116f660649e37df80000fd55b334cc;p=tpg%2Facess2.git Usermode/dhcpclient - Added echo of error string when write fails --- 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); }