Browse Source

Fix endianness of "shelf" field

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
dde3f99e4e
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/usr/aoeboot.c

+ 2
- 1
src/usr/aoeboot.c View File

@@ -1,6 +1,7 @@
1 1
 #include <stdint.h>
2 2
 #include <string.h>
3 3
 #include <stdio.h>
4
+#include <byteswap.h>
4 5
 #include <gpxe/aoe.h>
5 6
 #include <gpxe/ata.h>
6 7
 #include <gpxe/netdevice.h>
@@ -77,7 +78,7 @@ int aoeboot ( const char *root_path ) {
77 78
 		 sizeof ( boot_info.client ) );
78 79
 	memcpy ( boot_info.server, aoe->target,
79 80
 		 sizeof ( boot_info.server ) );
80
-	boot_info.shelf = aoe->major;
81
+	boot_info.shelf = htons ( aoe->major );
81 82
 	boot_info.slot = aoe->minor;
82 83
 	copy_to_real ( 0x40, 0xf0, &boot_info, sizeof ( boot_info ) );
83 84
 

Loading…
Cancel
Save