the dhcp command will return with 0 when ctrl-c is pressed. Fix this to -EINTR instead. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- net/dhcp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/dhcp.c b/net/dhcp.c index 8233ec3..7324c94 100644 --- a/net/dhcp.c +++ b/net/dhcp.c @@ -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; -- 1.8.2.rc2 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox