summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/autoboot.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/usr/autoboot.c b/src/usr/autoboot.c
index d87e36270..c7492ea7c 100644
--- a/src/usr/autoboot.c
+++ b/src/usr/autoboot.c
@@ -293,22 +293,24 @@ static void close_all_netdevs ( void ) {
/**
* Boot the system
*/
-void autoboot ( void ) {
+int autoboot ( void ) {
struct net_device *boot_netdev;
struct net_device *netdev;
+ int rc = -ENODEV;
/* If we have an identifable boot device, try that first */
close_all_netdevs();
if ( ( boot_netdev = find_boot_netdev() ) )
- netboot ( boot_netdev );
+ rc = netboot ( boot_netdev );
/* If that fails, try booting from any of the other devices */
for_each_netdev ( netdev ) {
if ( netdev == boot_netdev )
continue;
close_all_netdevs();
- netboot ( netdev );
+ rc = netboot ( netdev );
}
printf ( "No more network devices\n" );
+ return rc;
}