summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/grub/files/fix-endianness-problem.patch
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2015-01-03 18:38:19 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-16 23:08:19 +0000
commitac867c3d4d1991e2e4f83cca2bad0ee31716796e (patch)
treefbcd2a23598423e58061623e058d602d000c0a75 /meta/recipes-bsp/grub/files/fix-endianness-problem.patch
parent175d162b19b65a329163b0510d915ffae71af4de (diff)
downloadpoky-ac867c3d4d1991e2e4f83cca2bad0ee31716796e.tar.gz
grub 2.0: several fixes
* Make grub, grub-efi grub_git use a grub2.inc to reduce the duplicated code. * Make grub and grub-efi use the same patches since they use the same source. (grub_git is different). * grub-efi: - Use autotools to replace autotools-brokensep - Remove the DEPENDS of freetype, it should be a RDEPENDS. - Remove grub-2.00-ignore-gnulib-gets-stupidity.patch since it is a duplication of remove-gets.patch. - Make grub-efi.rpm contain files rather than make an empty package. * grub_git: - Fix a SSE build failure. [YOCTO #6310] (From OE-Core rev: cf4aaed28a34cc652352f0817316187b72babc76) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp/grub/files/fix-endianness-problem.patch')
-rw-r--r--meta/recipes-bsp/grub/files/fix-endianness-problem.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/files/fix-endianness-problem.patch b/meta/recipes-bsp/grub/files/fix-endianness-problem.patch
new file mode 100644
index 0000000000..079992afba
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/fix-endianness-problem.patch
@@ -0,0 +1,44 @@
1grub-core/net/tftp.c: fix endianness problem.
2
3 * grub-core/net/tftp.c (ack): Fix endianness problem.
4 (tftp_receive): Likewise.
5 Reported by: Michael Davidsaver.
6
7Upstream-Status: Backport
8
9diff --git a/ChangeLog b/ChangeLog
10index 81bdae9..c2f42d5 100644
11--- a/ChangeLog
12+++ b/ChangeLog
13@@ -1,3 +1,9 @@
14+2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
15+
16+ * grub-core/net/tftp.c (ack): Fix endianness problem.
17+ (tftp_receive): Likewise.
18+ Reported by: Michael Davidsaver.
19+
20 2012-06-27 Vladimir Serbinenko <phcoder@gmail.com>
21
22 * configure.ac: Bump version to 2.00.
23diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
24index 9c70efb..d0f39ea 100644
25--- a/grub-core/net/tftp.c
26+++ b/grub-core/net/tftp.c
27@@ -143,7 +143,7 @@ ack (tftp_data_t data, grub_uint16_t block)
28
29 tftph_ack = (struct tftphdr *) nb_ack.data;
30 tftph_ack->opcode = grub_cpu_to_be16 (TFTP_ACK);
31- tftph_ack->u.ack.block = block;
32+ tftph_ack->u.ack.block = grub_cpu_to_be16 (block);
33
34 err = grub_net_send_udp_packet (data->sock, &nb_ack);
35 if (err)
36@@ -225,7 +225,7 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)),
37 grub_priority_queue_pop (data->pq);
38
39 if (file->device->net->packs.count < 50)
40- err = ack (data, tftph->u.data.block);
41+ err = ack (data, data->block + 1);
42 else
43 {
44 file->device->net->stall = 1;