mirror of
https://github.com/ipxe/ipxe
synced 2025-12-12 23:15:10 +03:00
[autoboot] Ensure that an error message is always printed for a boot failure
The case of an unsupported SAN protocol will currently not result in any error message. Fix by printing the error message at the top level using strerror(), rather than using hard-coded error messages in the error paths.
This commit is contained in:
@@ -20,8 +20,6 @@ static int aoeboot ( const char *root_path ) {
|
||||
memset ( &ata, 0, sizeof ( ata ) );
|
||||
memset ( &drive, 0, sizeof ( drive ) );
|
||||
|
||||
printf ( "AoE booting from %s\n", root_path );
|
||||
|
||||
/* FIXME: ugly, ugly hack */
|
||||
struct net_device *netdev = last_opened_netdev();
|
||||
|
||||
|
||||
@@ -27,8 +27,6 @@ static int iscsiboot ( const char *root_path ) {
|
||||
goto err_alloc_drive;
|
||||
}
|
||||
|
||||
printf ( "iSCSI booting from %s\n", root_path );
|
||||
|
||||
if ( ( rc = iscsi_attach ( scsi, root_path ) ) != 0 ) {
|
||||
printf ( "Could not attach iSCSI device: %s\n",
|
||||
strerror ( rc ) );
|
||||
|
||||
Reference in New Issue
Block a user