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:
parent
2924294da1
commit
37b0cce64d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue