net: Return -EINTR when ctrl+c is pressed
authorMichal Simek <michal.simek@xilinx.com>
Fri, 21 Aug 2015 06:49:48 +0000 (08:49 +0200)
committerJoe Hershberger <joe.hershberger@ni.com>
Fri, 21 Aug 2015 21:32:05 +0000 (16:32 -0500)
commit19a4fbaaddd6542b46120d786bc375aee1b9e257
tree5cb3a2780882ce6fc6ea2b6e254ce3c743c9cbdd
parent6497e37a7523d0d438990c56aa7f609b17e6b571
net: Return -EINTR when ctrl+c is pressed

Current behavior is that if CTRL+C is pressed command returns 0 that was
successful which is not correct behavior.
The easiest test case is "tftpboot 80000 uImage && echo yes"
and press CTRL+C. Then the second command is called which is incorrect.

Error log:
zynq-uboot> tftpb 80000 uImage && echo yes
Gem.e000b000:7 is connected to Gem.e000b000.  Reconnecting to
Gem.e000b000
Gem.e000b000 Waiting for PHY auto negotiation to complete....... done
Using Gem.e000b000 device
TFTP from server 192.168.0.102; our IP address is 192.168.0.101
Filename 'uImage'.
Load address: 0x80000
Loading: ################
Abort
yes
zynq-uboot>

This patch adds -EINTR return value when CTRL+C is pressed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
net/net.c