From 9b45c0733e1cca961448d2c80e6e4a175ecc9c33 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Wed, 13 Nov 2013 13:34:57 +0000 Subject: [PATCH] * grub-core/osdep/unix/emuconsole.c (put): Pacify the compiler on systems that require checking the return value of write. --- ChangeLog | 5 +++++ grub-core/osdep/unix/emuconsole.c | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7f8ea589e..d68b33a74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-11-13 Colin Watson + + * grub-core/osdep/unix/emuconsole.c (put): Pacify the compiler on + systems that require checking the return value of write. + 2013-11-13 Colin Watson * util/grub-install.in (efi_quiet): Fix inverted logic: make diff --git a/grub-core/osdep/unix/emuconsole.c b/grub-core/osdep/unix/emuconsole.c index 9c1b5505b..7308798ef 100644 --- a/grub-core/osdep/unix/emuconsole.c +++ b/grub-core/osdep/unix/emuconsole.c @@ -49,8 +49,14 @@ static void put (struct grub_term_output *term __attribute__ ((unused)), const int c) { char chr = c; + ssize_t actual; - write (STDOUT_FILENO, &chr, 1); + actual = write (STDOUT_FILENO, &chr, 1); + if (actual < 1) + { + /* We cannot do anything about this, but some systems require us to at + least pretend to check the result. */ + } } static int