summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2007-07-31 04:48:43 +0200
committerMichael Brown2007-07-31 04:48:43 +0200
commitdde3f99e4ecbf2fac98dd4da429fb446d543f50e (patch)
tree945e98c3784b1fc88ac59912b4728bc386ee76d3
parentAdd identifier for the network device into the DHCP request. (diff)
downloadipxe-dde3f99e4ecbf2fac98dd4da429fb446d543f50e.tar.gz
ipxe-dde3f99e4ecbf2fac98dd4da429fb446d543f50e.tar.xz
ipxe-dde3f99e4ecbf2fac98dd4da429fb446d543f50e.zip
Fix endianness of "shelf" field
-rw-r--r--src/usr/aoeboot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/usr/aoeboot.c b/src/usr/aoeboot.c
index 91b80e34d..1ed4ce49f 100644
--- a/src/usr/aoeboot.c
+++ b/src/usr/aoeboot.c
@@ -1,6 +1,7 @@
#include <stdint.h>
#include <string.h>
#include <stdio.h>
+#include <byteswap.h>
#include <gpxe/aoe.h>
#include <gpxe/ata.h>
#include <gpxe/netdevice.h>
@@ -77,7 +78,7 @@ int aoeboot ( const char *root_path ) {
sizeof ( boot_info.client ) );
memcpy ( boot_info.server, aoe->target,
sizeof ( boot_info.server ) );
- boot_info.shelf = aoe->major;
+ boot_info.shelf = htons ( aoe->major );
boot_info.slot = aoe->minor;
copy_to_real ( 0x40, 0xf0, &boot_info, sizeof ( boot_info ) );