diff options
author | Michal Simek <michal.simek@xilinx.com> | 2015-08-21 08:49:48 +0200 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2015-08-21 16:32:05 -0500 |
commit | 19a4fbaaddd6542b46120d786bc375aee1b9e257 (patch) | |
tree | 5cb3a2780882ce6fc6ea2b6e254ce3c743c9cbdd /net | |
parent | 6497e37a7523d0d438990c56aa7f609b17e6b571 (diff) | |
download | u-boot-19a4fbaaddd6542b46120d786bc375aee1b9e257.tar.gz |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/net.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -565,6 +565,7 @@ restart: /* include a debug print as well incase the debug messages are directed to stderr */ debug_cond(DEBUG_INT_STATE, "--- net_loop Abort!\n"); + ret = -EINTR; goto done; } |