diff options
author | Michael Brown <mcb30@ipxe.org> | 2010-11-05 04:09:29 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2010-11-08 03:35:36 +0000 |
commit | f5115f96f7e41ead1162d0bc256545b2e8d870de (patch) | |
tree | a15aea85ae9a1598ca6d3f0d6afb4cdafd13ec6d /src/net/fcp.c | |
parent | 66e7619099a5810908fdc09124b4f254c54c3563 (diff) | |
download | ipxe-f5115f96f7e41ead1162d0bc256545b2e8d870de.tar.gz |
[fcp] Use EINVAL for URI parsing errors and EPROTO for protocol errors
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/fcp.c')
-rw-r--r-- | src/net/fcp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net/fcp.c b/src/net/fcp.c index e413e0736..0da57cfcb 100644 --- a/src/net/fcp.c +++ b/src/net/fcp.c @@ -512,7 +512,7 @@ static int fcpcmd_recv_xfer_rdy ( struct fcp_command *fcpcmd, DBGC ( fcpdev, "FCP %p xchg %04x received invalid transfer " "ready IU:\n", fcpdev, fcpcmd->xchg_id ); DBGC_HDA ( fcpdev, 0, iobuf->data, iob_len ( iobuf ) ); - rc = -EINVAL; + rc = -EPROTO; goto done; } if ( ntohl ( xfer_rdy->offset ) != fcpcmd->offset ) { @@ -521,7 +521,7 @@ static int fcpcmd_recv_xfer_rdy ( struct fcp_command *fcpcmd, "delivery (expected %zd, requested %d)\n", fcpdev, fcpcmd->xchg_id, fcpcmd->offset, ntohl ( xfer_rdy->offset ) ); - rc = -EINVAL; + rc = -EPROTO; goto done; } DBGC2 ( fcpdev, "FCP %p xchg %04x XFER_RDY [%08x,%08x)\n", @@ -564,7 +564,7 @@ static int fcpcmd_recv_rsp ( struct fcp_command *fcpcmd, DBGC ( fcpdev, "FCP %p xchg %04x received invalid response " "IU:\n", fcpdev, fcpcmd->xchg_id ); DBGC_HDA ( fcpdev, 0, iobuf->data, iob_len ( iobuf ) ); - rc = -EINVAL; + rc = -EPROTO; goto done; } DBGC2 ( fcpdev, "FCP %p xchg %04x RSP stat %02x resid %08x flags %02x" @@ -645,7 +645,7 @@ static int fcpcmd_recv_unknown ( struct fcp_command *fcpcmd, fcpdev, fcpcmd->xchg_id ); DBGC_HDA ( fcpdev, 0, iobuf->data, iob_len ( iobuf ) ); free_iob ( iobuf ); - return -EINVAL; + return -EPROTO; } /** |