[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:
Michael Brown
2009-11-17 03:46:45 +00:00
parent f406edefae
commit 5bee2a2991
3 changed files with 16 additions and 18 deletions

View File

@@ -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();

View File

@@ -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 ) );