[linux] Fix console output on big-endian targets

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2026-06-13 16:12:40 +01:00
parent e6e9ae9804
commit 85700526ec
+3 -1
View 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));
}