[SLOF] [PATCH] dev-null: The "read" function has to return 0 if nothing has been read

David Gibson david at gibson.dropbear.id.au
Wed Feb 24 13:49:50 AEDT 2016

On Wed, Feb 24, 2016 at 11:39:40AM +1100, Alexey Kardashevskiy wrote:
> On 02/24/2016 01:54 AM, Laurent Vivier wrote:
> >
> >
> >On 23/02/2016 15:40, Thomas Huth wrote:
> >>The "read" function of the dev-null device currently claims that
> >>the same amount of bytes has been read as input bytes have been
> >>requested. This causes grub to hang forever at the boot selection
> >>menu, since grub then thinks that there's a continuous stream of input
> >>data. If nothing has been read (which is always the case for the
> >>dev-null device), the "read" function should simply return 0 instead.
> >>Then grub also boots properly again after the typical short timeout.
> >>
> >>Reported-by: Laurent Vivier <lvivier at redhat.com>
> >>Signed-off-by: Thomas Huth <thuth at redhat.com>
> >
> >Tested-by: Laurent Vivier <lvivier at redhat.com>
> Thanks, applied.
> But how did you get this hang? How come that I've never seen that?

I believe it happens when you try to boot without a console, or only a
console that SLOF doesn't understand like the virtio-console.

David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/slof/attachments/20160224/230c387f/attachment.sig>

More information about the SLOF mailing list