Re: [PATCH] buffered file read

2008-07-31 Thread Bean
On Fri, Aug 1, 2008 at 4:06 AM, Marco Gerards <[EMAIL PROTECTED]> wrote: > Bean <[EMAIL PROTECTED]> writes: > >> On Fri, Aug 1, 2008 at 3:18 AM, Marco Gerards <[EMAIL PROTECTED]> wrote: >>> Hi Bean, >>> >>> Bean <[EMAIL PROTECTED]> writes: >>> I have added a buffer length parameter to grub_buf

Re: [PATCH] buffered file read

2008-07-31 Thread Marco Gerards
Bean <[EMAIL PROTECTED]> writes: > On Fri, Aug 1, 2008 at 3:18 AM, Marco Gerards <[EMAIL PROTECTED]> wrote: >> Hi Bean, >> >> Bean <[EMAIL PROTECTED]> writes: >> >>> I have added a buffer length parameter to grub_buffile_open: >>> >>> grub_file_t grub_buffile_open (const char *name, int size); >>>

Re: [PATCH] buffered file read

2008-07-31 Thread Bean
On Fri, Aug 1, 2008 at 3:18 AM, Marco Gerards <[EMAIL PROTECTED]> wrote: > Hi Bean, > > Bean <[EMAIL PROTECTED]> writes: > >> I have added a buffer length parameter to grub_buffile_open: >> >> grub_file_t grub_buffile_open (const char *name, int size); >> >> size < 0: Load the whole file. >> size =

Re: [PATCH] buffered file read

2008-07-31 Thread Marco Gerards
Hi Bean, Bean <[EMAIL PROTECTED]> writes: > I have added a buffer length parameter to grub_buffile_open: > > grub_file_t grub_buffile_open (const char *name, int size); > > size < 0: Load the whole file. > size = 0: Use default buffer size (8192 bytes) > size > 0: Custom buffer size = size > > Th

Re: [PATCH] buffered file read

2008-07-29 Thread Colin D Bennett
On Wed, 30 Jul 2008 11:48:19 +0800 Bean <[EMAIL PROTECTED]> wrote: > On Mon, Jul 28, 2008 at 1:08 PM, Bean <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I have added a buffer length parameter to grub_buffile_open: > > > ... > > If no one objects, I'd commit this patch soon. > Sounds good to me!

Re: [PATCH] buffered file read

2008-07-29 Thread Bean
On Mon, Jul 28, 2008 at 1:08 PM, Bean <[EMAIL PROTECTED]> wrote: > Hi, > > I have added a buffer length parameter to grub_buffile_open: > > grub_file_t grub_buffile_open (const char *name, int size); > > size < 0: Load the whole file. > size = 0: Use default buffer size (8192 bytes) > size > 0: Cus

Re: [PATCH] buffered file read

2008-07-27 Thread Bean
Hi, I have added a buffer length parameter to grub_buffile_open: grub_file_t grub_buffile_open (const char *name, int size); size < 0: Load the whole file. size = 0: Use default buffer size (8192 bytes) size > 0: Custom buffer size = size The upper limit is 1m, if size > 1m, we set it to 1m. 2

Re: [PATCH] buffered file read

2008-07-27 Thread Robert Millan
On Mon, Jul 28, 2008 at 01:52:40AM +0800, Bean wrote: > > * video/png.c (grub_video_reader_png): Use grub_buffile_open to open > file. > > * video/jpeg.c (grub_video_reader_jpeg): Likewise. > > * video/tga.c (grub_video_reader_tga): Likewise. Maybe it's a good idea to us

Re: [PATCH] buffered file read

2008-07-27 Thread Bean
On Mon, Jul 28, 2008 at 3:51 AM, Colin D Bennett <[EMAIL PROTECTED]> wrote: > On Mon, 28 Jul 2008 01:52:40 +0800 > Bean <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> This patch add a new module bufio, which reads block of data at a >> time, and return the required range to the upper level. This is >> e

Re: [PATCH] buffered file read

2008-07-27 Thread Colin D Bennett
On Mon, 28 Jul 2008 01:52:40 +0800 Bean <[EMAIL PROTECTED]> wrote: > Hi, > > This patch add a new module bufio, which reads block of data at a > time, and return the required range to the upper level. This is > extremely useful in modules like png, where data are normally read one > byte at a tim

[PATCH] buffered file read

2008-07-27 Thread Bean
Hi, This patch add a new module bufio, which reads block of data at a time, and return the required range to the upper level. This is extremely useful in modules like png, where data are normally read one byte at a time. To use buffered io service, just include header file , and replace grub_file