grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] util: Detect more I/O errors


From: Colin Watson
Subject: Re: [PATCH] util: Detect more I/O errors
Date: Thu, 28 Feb 2019 09:33:49 +0000
User-agent: NeoMutt/20170113 (1.7.2)

On Wed, Feb 27, 2019 at 09:10:08AM +0000, Colin Watson wrote:
> Many of GRUB's utilities don't check anywhere near all the possible
> write errors.  For example, if grub-install runs out of space when
> copying a file, it won't notice.  There were missing checks for the
> return values of write, fflush, fsync, and close (or the equivalents on
> other OSes), all of which must be checked.
> 
> I tried to be consistent with the existing logging practices of the
> various hostdisk implementations, but they weren't entirely consistent
> to start with so I used my judgement.  The result at least looks
> reasonable on GNU/Linux when I provoke a write error:
> 
>   Installing for x86_64-efi platform.
>   grub-install: error: cannot copy 
> `/usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed' to 
> `/boot/efi/EFI/debian/grubx64.efi': No space left on device.
> 
> There are more missing checks in other utilities, but this should fix
> the most critical ones.
> 
> Fixes Debian bug #922741.

Oh, I forgot to include it in the commit message, but this is:

Signed-off-by: Colin Watson <address@hidden>

-- 
Colin Watson                                       address@hidden



reply via email to

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