9
0
Fork 0

net: dhcp: Fix return value on ctrl-c

the dhcp command will return with 0 when ctrl-c is pressed. Fix this to
-EINTR instead.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2013-05-14 11:50:15 +02:00
parent 2924294da1
commit 37b0cce64d
1 changed files with 4 additions and 2 deletions

View File

@ -767,8 +767,10 @@ static int do_dhcp(int argc, char *argv[])
goto out1;
while (dhcp_state != BOUND) {
if (ctrlc())
break;
if (ctrlc()) {
ret = -EINTR;
goto out1;
}
if (!retries) {
ret = -ETIMEDOUT;
goto out1;