grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] read command


From: Robert Millan
Subject: Re: [PATCH] read command
Date: Sat, 2 Feb 2008 18:05:49 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

On Sat, Feb 02, 2008 at 01:38:28PM +0100, Yoshinori K. Okuji wrote:
> >
> > Does it make sense to move any of these two to kernel?  Or to normal.mod ? 
> > Or maybe just to un-static-ize them and leave them here?
> 
> What would be other use cases?

No idea.  I suggest we just leave grub_getline here and if later we find it's
needed we can move it to normal or kernel.

> BTW it is a bad idea to use xrealloc. xmalloc and xrealloc are sometimes used 
> in the GNU Project, but they must not be used in GRUB. If a program runs in 
> user space, when it panics, the control is back to the OS. But GRUB is a 
> standalone program. When it panics, the user loses any kind of control. Thus 
> grub_fatal must be used only if there is nothing else you can do.
> 
> In this case, grub_getline should simply return NULL. How the user deals with 
> this situation is up to the user.

Ok, here's a new patch, with grub_getline returning NULL and the caller handling
"out of mem" error.

Also fixed a memleak.

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)

Attachment: read.diff
Description: Text Data


reply via email to

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