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

2019-02-28 Thread Elliott, Robert (Persistent Memory)
> -Original Message- > From: Grub-devel On > Behalf Of Colin Watson > Sent: Wednesday, February 27, 2019 3:10 AM > Subject: [PATCH] util: Detect more I/O errors > ... > -void > +int > grub_util_file_sync (FILE *f) > { > - fflush (f); > + if (fflush (f) != 0) > +return -1; >

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

2019-02-28 Thread Colin Watson
On Wed, Feb 27, 2019 at 09:10:08AM +, 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, ff