Skip to content

Commit 8570052

Browse files
committed
[linux] Fix console output on big-endian targets
Signed-off-by: Michael Brown <mcb30@ipxe.org>
1 parent e6e9ae9 commit 8570052

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/interface/linux/linux_console.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ FILE_LICENCE(GPL2_OR_LATER);
4343

4444
static void linux_console_putchar(int c)
4545
{
46+
char ch = c;
47+
4648
/* write to stdout */
47-
if (linux_write(1, &c, 1) != 1)
49+
if (linux_write(1, &ch, sizeof (ch)) != 1)
4850
DBG("linux_console write failed (%s)\n", linux_strerror(linux_errno));
4951
}
5052

0 commit comments

Comments
 (0)