aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gfxboot
diff options
context:
space:
mode:
authorSebastian Herbszt <herbszt@gmx.de>2011-03-30 23:09:32 +0200
committerSebastian Herbszt <herbszt@gmx.de>2011-03-30 23:09:32 +0200
commit48802f81a520a9deda01840e0be280062071b27b (patch)
treec1eae631c9072ac01071d8533f161cf8bf69d883 /com32/gfxboot
parentd719172f79ad0f577cfc115b101820999914ba46 (diff)
downloadsyslinux-48802f81a520a9deda01840e0be280062071b27b.tar.gz
syslinux-48802f81a520a9deda01840e0be280062071b27b.tar.xz
syslinux-48802f81a520a9deda01840e0be280062071b27b.zip
gfxboot: remove save_read() function
Remove the no longer needed save_read() function. Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
Diffstat (limited to 'com32/gfxboot')
-rw-r--r--com32/gfxboot/gfxboot.c26
1 files changed, 2 insertions, 24 deletions
diff --git a/com32/gfxboot/gfxboot.c b/com32/gfxboot/gfxboot.c
index 37651fa3..37499202 100644
--- a/com32/gfxboot/gfxboot.c
+++ b/com32/gfxboot/gfxboot.c
@@ -151,9 +151,6 @@ int timeout;
char cmdline[MAX_CMDLINE_LEN];
-void *save_buf;
-unsigned save_buf_size;
-
// progress bar is visible
unsigned progress_active;
@@ -174,7 +171,6 @@ void gfx_infobox(int type, char *str1, char *str2);
void gfx_progress_init(ssize_t kernel_size, char *label);
void gfx_progress_update(ssize_t size);
void gfx_progress_done(void);
-ssize_t save_read(int fd, void *buf, size_t size);
void *load_one(char *file, ssize_t *file_size);
void boot(int index);
void boot_entry(menu_t *menu_ptr, char *arg);
@@ -214,9 +210,6 @@ int main(int argc, char **argv)
gfx_config.sysconfig_size = sizeof gfx_config;
gfx_config.bootloader_seg = 0; // apparently not needed
- save_buf_size = LOWMEM_BUF_SIZE;
- save_buf = malloc(save_buf_size);
-
if(argc < 2) {
printf("Usage: gfxboot.c32 bootlogo_file [message_file]\n");
if(argc > 2) show_message(argv[2]);
@@ -743,21 +736,6 @@ void gfx_progress_done(void)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-// Like read(2) but preserve lowmem buffer.
-//
-ssize_t save_read(int fd, void *buf, size_t size)
-{
- ssize_t i;
-
- memcpy(save_buf, lowmem_buf, save_buf_size);
- i = read(fd, buf, size);
- memcpy(lowmem_buf, save_buf, save_buf_size);
-
- return i;
-}
-
-
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Read file and update progress bar.
//
void *load_one(char *file, ssize_t *file_size)
@@ -784,7 +762,7 @@ void *load_one(char *file, ssize_t *file_size)
if(size) {
buf = malloc(size);
for(i = 1, cur = 0 ; cur < size && i > 0; cur += i) {
- i = save_read(fd, buf + cur, min(CHUNK_SIZE, size - cur));
+ i = read(fd, buf + cur, min(CHUNK_SIZE, size - cur));
if(i == -1) break;
gfx_progress_update(i);
}
@@ -792,7 +770,7 @@ void *load_one(char *file, ssize_t *file_size)
else {
do {
buf = realloc(buf, size + CHUNK_SIZE);
- i = save_read(fd, buf + size, CHUNK_SIZE);
+ i = read(fd, buf + size, CHUNK_SIZE);
if(i == -1) break;
size += i;
gfx_progress_update(i);