From 92d15eff30410dcb0ec406e06b131fb7d9179ffd Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 25 Mar 2008 20:46:16 +0000 Subject: [Settings] Remove assumption that all settings have DHCP tag values Allow for settings to be described by something other than a DHCP option tag if desirable. Currently used only for the MAC address setting. Separate out fake DHCP packet creation code from dhcp.c to fakedhcp.c. Remove notion of settings from dhcppkt.c. Rationalise dhcp.c to use settings API only for final registration of the DHCP options, rather than using {store,fetch}_setting throughout. --- src/usr/aoeboot.c | 2 -- src/usr/autoboot.c | 4 ++-- src/usr/iscsiboot.c | 2 -- 3 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src/usr') diff --git a/src/usr/aoeboot.c b/src/usr/aoeboot.c index 6bf56a87b..f0e481bd7 100644 --- a/src/usr/aoeboot.c +++ b/src/usr/aoeboot.c @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include @@ -56,7 +55,6 @@ int aoeboot ( const char *root_path ) { container_of ( ata.backend, struct aoe_session, refcnt ); abft_fill_data ( aoe ); - drive.drive = fetch_uintz_setting ( NULL, DHCP_EB_BIOS_DRIVE ); drive.blockdev = &ata.blockdev; register_int13_drive ( &drive ); diff --git a/src/usr/autoboot.c b/src/usr/autoboot.c index bc86d05e8..c1a61ec04 100644 --- a/src/usr/autoboot.c +++ b/src/usr/autoboot.c @@ -147,14 +147,14 @@ static int netboot ( struct net_device *netdev ) { return rc; /* Try to download and boot whatever we are given as a filename */ - fetch_string_setting ( NULL, DHCP_BOOTFILE_NAME, buf, sizeof ( buf ) ); + fetch_string_setting ( NULL, &filename_setting, buf, sizeof ( buf ) ); if ( buf[0] ) { printf ( "Booting from filename \"%s\"\n", buf ); return boot_filename ( buf ); } /* No filename; try the root path */ - fetch_string_setting ( NULL, DHCP_ROOT_PATH, buf, sizeof ( buf ) ); + fetch_string_setting ( NULL, &root_path_setting, buf, sizeof ( buf ) ); if ( buf[0] ) { printf ( "Booting from root path \"%s\"\n", buf ); return boot_root_path ( buf ); diff --git a/src/usr/iscsiboot.c b/src/usr/iscsiboot.c index c3a477c4a..99edc8795 100644 --- a/src/usr/iscsiboot.c +++ b/src/usr/iscsiboot.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include #include @@ -46,7 +45,6 @@ int iscsiboot ( const char *root_path ) { goto error_init; } - drive.drive = fetch_uintz_setting ( NULL, DHCP_EB_BIOS_DRIVE ); drive.blockdev = &scsi.blockdev; /* FIXME: ugly, ugly hack */ -- cgit v1.2.3-55-g7522