diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-12-12 14:36:02 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-12-14 13:56:44 -0800 |
commit | e2ab9215d792d07cfb725de290f416e331b87627 (patch) | |
tree | 7fbf2b3f921ef78b277f5d89c1a9a14960a49edc /gpxe/src/usr/autoboot.c | |
parent | 36390f9712ac56be1dce7a635322bd96e15620c1 (diff) | |
download | syslinux-kkpxe.tar.gz |
gPXE: update to the "kkpxe" branchkkpxe
Update gPXE to the "kkpxe" branch, an experimental branch of the gPXE
tree which should let us eliminate the gpxelinux-specific hacks.
Specifically, this corresponds to checkin
0963c883a9402bd5846e687a100e196f7e8a2ef7 of
git://git.etherboot.org/scm/people/mcb30/gpxe.git.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'gpxe/src/usr/autoboot.c')
-rw-r--r-- | gpxe/src/usr/autoboot.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/gpxe/src/usr/autoboot.c b/gpxe/src/usr/autoboot.c index 326292b4..f5f7f7d1 100644 --- a/gpxe/src/usr/autoboot.c +++ b/gpxe/src/usr/autoboot.c @@ -24,13 +24,12 @@ #include <gpxe/settings.h> #include <gpxe/image.h> #include <gpxe/embedded.h> +#include <gpxe/sanboot.h> #include <gpxe/uri.h> #include <usr/ifmgmt.h> #include <usr/route.h> #include <usr/dhcpmgmt.h> #include <usr/imgmgmt.h> -#include <usr/iscsiboot.h> -#include <usr/aoeboot.h> #include <usr/autoboot.h> /** @file @@ -45,6 +44,12 @@ /** Shutdown flags for exit */ int shutdown_exit_flags = 0; +/* SAN boot protocols */ +static struct sanboot_protocol sanboot_protocols[0] \ + __table_start ( struct sanboot_protocol, sanboot_protocols ); +static struct sanboot_protocol sanboot_protocols_end[0] \ + __table_end ( struct sanboot_protocol, sanboot_protocols ); + /** * Identify the boot network device * @@ -141,12 +146,15 @@ static int boot_next_server_and_filename ( struct in_addr next_server, * @ret rc Return status code */ int boot_root_path ( const char *root_path ) { + struct sanboot_protocol *sanboot; /* Quick hack */ - if ( strncmp ( root_path, "iscsi:", 6 ) == 0 ) { - return iscsiboot ( root_path ); - } else if ( strncmp ( root_path, "aoe:", 4 ) == 0 ) { - return aoeboot ( root_path ); + for ( sanboot = sanboot_protocols ; + sanboot < sanboot_protocols_end ; sanboot++ ) { + if ( strncmp ( root_path, sanboot->prefix, + strlen ( sanboot->prefix ) ) == 0 ) { + return sanboot->boot ( root_path ); + } } return -ENOTSUP; |