aboutsummaryrefslogtreecommitdiff
path: root/src/usr
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2008-03-20 23:42:11 +0000
committerMichael Brown <mcb30@etherboot.org>2008-03-20 23:42:11 +0000
commiteae6ac3d0bdb5f25193af9584db4eec9dd5226c9 (patch)
tree054766fb4978ee8ef4ea2dc7ad985f92a0689be6 /src/usr
parentcf033046206aede5064c798bfa887fbb888b9217 (diff)
downloadipxe-eae6ac3d0bdb5f25193af9584db4eec9dd5226c9.zip
ipxe-eae6ac3d0bdb5f25193af9584db4eec9dd5226c9.tar.gz
ipxe-eae6ac3d0bdb5f25193af9584db4eec9dd5226c9.tar.bz2
[Settings] Convert code in src/usr to use settings API.
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/aoeboot.c3
-rw-r--r--src/usr/autoboot.c7
-rw-r--r--src/usr/iscsiboot.c3
3 files changed, 7 insertions, 6 deletions
diff --git a/src/usr/aoeboot.c b/src/usr/aoeboot.c
index 82b63e7..6bf56a8 100644
--- a/src/usr/aoeboot.c
+++ b/src/usr/aoeboot.c
@@ -6,6 +6,7 @@
#include <gpxe/ata.h>
#include <gpxe/netdevice.h>
#include <gpxe/dhcp.h>
+#include <gpxe/settings.h>
#include <gpxe/abft.h>
#include <int13.h>
#include <usr/aoeboot.h>
@@ -55,7 +56,7 @@ int aoeboot ( const char *root_path ) {
container_of ( ata.backend, struct aoe_session, refcnt );
abft_fill_data ( aoe );
- drive.drive = find_global_dhcp_num_option ( DHCP_EB_BIOS_DRIVE );
+ 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 b84bd7b..bc86d05 100644
--- a/src/usr/autoboot.c
+++ b/src/usr/autoboot.c
@@ -21,6 +21,7 @@
#include <errno.h>
#include <gpxe/netdevice.h>
#include <gpxe/dhcp.h>
+#include <gpxe/settings.h>
#include <gpxe/image.h>
#include <gpxe/embedded.h>
#include <usr/ifmgmt.h>
@@ -146,16 +147,14 @@ static int netboot ( struct net_device *netdev ) {
return rc;
/* Try to download and boot whatever we are given as a filename */
- dhcp_snprintf ( buf, sizeof ( buf ),
- find_global_dhcp_option ( DHCP_BOOTFILE_NAME ) );
+ fetch_string_setting ( NULL, DHCP_BOOTFILE_NAME, buf, sizeof ( buf ) );
if ( buf[0] ) {
printf ( "Booting from filename \"%s\"\n", buf );
return boot_filename ( buf );
}
/* No filename; try the root path */
- dhcp_snprintf ( buf, sizeof ( buf ),
- find_global_dhcp_option ( DHCP_ROOT_PATH ) );
+ fetch_string_setting ( NULL, DHCP_ROOT_PATH, 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 a7caeba..c3a477c 100644
--- a/src/usr/iscsiboot.c
+++ b/src/usr/iscsiboot.c
@@ -3,6 +3,7 @@
#include <stdio.h>
#include <gpxe/iscsi.h>
#include <gpxe/dhcp.h>
+#include <gpxe/settings.h>
#include <gpxe/netdevice.h>
#include <gpxe/ibft.h>
#include <int13.h>
@@ -45,7 +46,7 @@ int iscsiboot ( const char *root_path ) {
goto error_init;
}
- drive.drive = find_global_dhcp_num_option ( DHCP_EB_BIOS_DRIVE );
+ drive.drive = fetch_uintz_setting ( NULL, DHCP_EB_BIOS_DRIVE );
drive.blockdev = &scsi.blockdev;
/* FIXME: ugly, ugly hack */