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

Loading…
Cancel
Save