grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 09/10] kern/efi/efi: Correct endianness in IPv6 device path


From: Michael Chang
Subject: [PATCH 09/10] kern/efi/efi: Correct endianness in IPv6 device path
Date: Mon, 16 Dec 2024 16:03:38 +0800

Signed-off-by: Michael Chang <mchang@suse.com>
---
 grub-core/kern/efi/efi.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
index 2997ab721..122adf267 100644
--- a/grub-core/kern/efi/efi.c
+++ b/grub-core/kern/efi/efi.c
@@ -790,22 +790,22 @@ grub_efi_print_device_path (grub_efi_device_path_t *dp)
                grub_efi_ipv6_device_path_t *ipv6
                  = (grub_efi_ipv6_device_path_t *) dp;
                grub_printf 
("/IPv6(%x:%x:%x:%x:%x:%x:%x:%x,%x:%x:%x:%x:%x:%x:%x:%x,%u,%u,%x,%x)",
-                            (unsigned) ipv6->local_ip_address[0],
-                            (unsigned) ipv6->local_ip_address[1],
-                            (unsigned) ipv6->local_ip_address[2],
-                            (unsigned) ipv6->local_ip_address[3],
-                            (unsigned) ipv6->local_ip_address[4],
-                            (unsigned) ipv6->local_ip_address[5],
-                            (unsigned) ipv6->local_ip_address[6],
-                            (unsigned) ipv6->local_ip_address[7],
-                            (unsigned) ipv6->remote_ip_address[0],
-                            (unsigned) ipv6->remote_ip_address[1],
-                            (unsigned) ipv6->remote_ip_address[2],
-                            (unsigned) ipv6->remote_ip_address[3],
-                            (unsigned) ipv6->remote_ip_address[4],
-                            (unsigned) ipv6->remote_ip_address[5],
-                            (unsigned) ipv6->remote_ip_address[6],
-                            (unsigned) ipv6->remote_ip_address[7],
+                            (unsigned) grub_cpu_to_be16 
(ipv6->local_ip_address[0]),
+                            (unsigned) grub_cpu_to_be16 
(ipv6->local_ip_address[1]),
+                            (unsigned) grub_cpu_to_be16 
(ipv6->local_ip_address[2]),
+                            (unsigned) grub_cpu_to_be16 
(ipv6->local_ip_address[3]),
+                            (unsigned) grub_cpu_to_be16 
(ipv6->local_ip_address[4]),
+                            (unsigned) grub_cpu_to_be16 
(ipv6->local_ip_address[5]),
+                            (unsigned) grub_cpu_to_be16 
(ipv6->local_ip_address[6]),
+                            (unsigned) grub_cpu_to_be16 
(ipv6->local_ip_address[7]),
+                            (unsigned) grub_cpu_to_be16 
(ipv6->remote_ip_address[0]),
+                            (unsigned) grub_cpu_to_be16 
(ipv6->remote_ip_address[1]),
+                            (unsigned) grub_cpu_to_be16 
(ipv6->remote_ip_address[2]),
+                            (unsigned) grub_cpu_to_be16 
(ipv6->remote_ip_address[3]),
+                            (unsigned) grub_cpu_to_be16 
(ipv6->remote_ip_address[4]),
+                            (unsigned) grub_cpu_to_be16 
(ipv6->remote_ip_address[5]),
+                            (unsigned) grub_cpu_to_be16 
(ipv6->remote_ip_address[6]),
+                            (unsigned) grub_cpu_to_be16 
(ipv6->remote_ip_address[7]),
                             (unsigned) ipv6->local_port,
                             (unsigned) ipv6->remote_port,
                             (unsigned) ipv6->protocol,
-- 
2.47.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]