]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[linux] Fix console output on big-endian targets
authorMichael Brown <mcb30@ipxe.org>
Sat, 13 Jun 2026 15:12:40 +0000 (16:12 +0100)
committerMichael Brown <mcb30@ipxe.org>
Sat, 13 Jun 2026 15:12:40 +0000 (16:12 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/interface/linux/linux_console.c

index d5415b61c06b02c697afdce83e31ede219872b4b..79a9c4b7e6d68dd7dae345712b1c44514778a165 100644 (file)
@@ -43,8 +43,10 @@ FILE_LICENCE(GPL2_OR_LATER);
 
 static void linux_console_putchar(int c)
 {
+       char ch = c;
+
        /* write to stdout */
-       if (linux_write(1, &c, 1) != 1)
+       if (linux_write(1, &ch, sizeof (ch)) != 1)
                DBG("linux_console write failed (%s)\n", linux_strerror(linux_errno));
 }