mirror of https://github.com/ipxe/ipxe.git
Print explicit error message on iSCSI boot failure, and add
"Permission denied" as an error text to strerror().pull/1/head
parent
fbc7b4dfa8
commit
286db6ffa3
|
@ -57,3 +57,4 @@ struct errortab enoem __errortab = { ENOMEM, "Out of memory" };
|
||||||
struct errortab einval __errortab = { EINVAL, "Invalid argument" };
|
struct errortab einval __errortab = { EINVAL, "Invalid argument" };
|
||||||
struct errortab enospc __errortab = { ENOSPC, "No space left on device" };
|
struct errortab enospc __errortab = { ENOSPC, "No space left on device" };
|
||||||
struct errortab eio __errortab = { EIO, "Input/output error" };
|
struct errortab eio __errortab = { EIO, "Input/output error" };
|
||||||
|
struct errortab eacces __errortab = { EACCES, "Permission denied" };
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <string.h>
|
||||||
#include <byteswap.h>
|
#include <byteswap.h>
|
||||||
#include <vsprintf.h>
|
#include <vsprintf.h>
|
||||||
#include <gpxe/netdevice.h>
|
#include <gpxe/netdevice.h>
|
||||||
|
@ -30,7 +31,8 @@ int test_iscsiboot ( const char *initiator_iqn,
|
||||||
|
|
||||||
printf ( "Initialising %s\n", target_iqn );
|
printf ( "Initialising %s\n", target_iqn );
|
||||||
if ( ( rc = init_iscsidev ( &test_iscsidev ) ) != 0 ) {
|
if ( ( rc = init_iscsidev ( &test_iscsidev ) ) != 0 ) {
|
||||||
printf ( "Could not reach %s\n", target_iqn );
|
printf ( "Could not reach %s: %s\n", target_iqn,
|
||||||
|
strerror ( errno ) );
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
ibft_fill_data ( netdev, initiator_iqn, target, target_iqn );
|
ibft_fill_data ( netdev, initiator_iqn, target, target_iqn );
|
||||||
|
|
Loading…
Reference in New Issue