Author: stepan Date: 2009-04-05 00:27:10 +0200 (Sun, 05 Apr 2009) New Revision: 4071
Modified: trunk/coreboot-v2/src/stream/ide_stream.c Log: fix this warning: coreboot-v2-4067//src/stream/ide_stream.c: In function 'stream_ide_read': coreboot-v2-4067//src/stream/ide_stream.c:47: warning: declaration of 'offset' shadows a global declaration coreboot-v2-4067//src/stream/ide_stream.c:13: warning: shadowed declaration is here
Signed-off-by: Stefan Reinauer stepan@coresystems.de Acked-by: Stefan Reinauer stepan@coresystems.de
Modified: trunk/coreboot-v2/src/stream/ide_stream.c =================================================================== --- trunk/coreboot-v2/src/stream/ide_stream.c 2009-04-04 22:24:23 UTC (rev 4070) +++ trunk/coreboot-v2/src/stream/ide_stream.c 2009-04-04 22:27:10 UTC (rev 4071) @@ -11,6 +11,7 @@ #endif
static unsigned long offset; + int stream_init(void) { int i,res; @@ -44,7 +45,8 @@ static unsigned char buffer[512]; static unsigned int block_num = 0; static unsigned int first_fill = 1; -static byte_offset_t stream_ide_read(void *vdest, byte_offset_t offset, byte_offset_t count) + +static byte_offset_t stream_ide_read(void *vdest, byte_offset_t offs, byte_offset_t count) { byte_offset_t bytes = 0; unsigned char *dest = vdest; @@ -54,14 +56,14 @@ unsigned int byte_offset, len;
/* The block is not cached in memory or frist time called */ - if (block_num != offset / 512 || first_fill) { - block_num = offset / 512; + if (block_num != offs / 512 || first_fill) { + block_num = offs / 512; printk_notice ("."); ide_read(IDE_BOOT_DRIVE, block_num, buffer); first_fill = 0; }
- byte_offset = offset % 512; + byte_offset = offs % 512; len = 512 - byte_offset; if (len > (count - bytes)) { len = (count - bytes); @@ -69,7 +71,7 @@
memcpy(dest, buffer + byte_offset, len);
- offset += len; + offs += len; bytes += len; dest += len;