소스 검색

Fix endianness of "shelf" field

tags/v0.9.3
Michael Brown 17 년 전
부모
커밋
dde3f99e4e
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2
    1
      src/usr/aoeboot.c

+ 2
- 1
src/usr/aoeboot.c 파일 보기

@@ -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…
취소
저장