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

2019-03-01 Thread Daniel Kiper
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

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

2019-03-01 Thread Colin Watson
On Thu, Feb 28, 2019 at 04:32:44PM +, Elliott, Robert (Persistent Memory) wrote: > > -Original Message- > > From: Grub-devel On > > Behalf Of Colin Watson > ... > > -void > > +int > > grub_util_file_sync (FILE *f) > > { > > - fflush (f); > > + if (fflush (f) != 0) > > +return

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

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

2019-02-27 Thread Steve McIntyre
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, fflush