Re: [PATCH] read command

2008-02-02 Thread Robert Millan
On Sat, Feb 02, 2008 at 07:48:57PM +0100, Yoshinori K. Okuji wrote: > > Ok, here's a new patch, with grub_getline returning NULL and the caller > > handling "out of mem" error. > > > > Also fixed a memleak. > > You don't have to set grub_errno explicitly, because grub_realloc should do > it. > >

Re: [PATCH] read command

2008-02-02 Thread Yoshinori K. Okuji
On Saturday 02 February 2008 18:05, Robert Millan wrote: > 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

Re: [PATCH] read command

2008-02-02 Thread Robert Millan
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 he

Re: [PATCH] read command

2008-02-02 Thread Yoshinori K. Okuji
On Friday 01 February 2008 23:48, Robert Millan wrote: > On Fri, Feb 01, 2008 at 11:45:50PM +0100, Robert Millan wrote: > > +static void * > > +grub_xrealloc (void *ptr, grub_size_t size) > > +{ > > + void *value = grub_realloc (ptr, size); > > + if (value == 0) > > +grub_fatal ("Virtual memo

Re: [PATCH] read command

2008-02-01 Thread Robert Millan
On Fri, Feb 01, 2008 at 11:45:50PM +0100, Robert Millan wrote: > +static void * > +grub_xrealloc (void *ptr, grub_size_t size) > +{ > + void *value = grub_realloc (ptr, size); > + if (value == 0) > +grub_fatal ("Virtual memory exhausted"); > + return value; > +} > + > +static char * > +grub_