* [Qemu-devel] [4233] x86: remove load_kernel()
@ 2008-04-22 6:49 Aurelien Jarno
0 siblings, 0 replies; only message in thread
From: Aurelien Jarno @ 2008-04-22 6:49 UTC (permalink / raw)
To: qemu-devel
Revision: 4233
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4233
Author: aurel32
Date: 2008-04-22 06:49:43 +0000 (Tue, 22 Apr 2008)
Log Message:
-----------
x86: remove load_kernel()
(Jan Kiszka)
Modified Paths:
--------------
trunk/hw/pc.c
Modified: trunk/hw/pc.c
===================================================================
--- trunk/hw/pc.c 2008-04-22 03:15:10 UTC (rev 4232)
+++ trunk/hw/pc.c 2008-04-22 06:49:43 UTC (rev 4233)
@@ -445,37 +445,6 @@
bdrv_set_boot_sector(drives_table[hda].bdrv, bootsect, sizeof(bootsect));
}
-static int load_kernel(const char *filename, uint8_t *addr,
- uint8_t *real_addr)
-{
- int fd, size;
- int setup_sects;
-
- fd = open(filename, O_RDONLY | O_BINARY);
- if (fd < 0)
- return -1;
-
- /* load 16 bit code */
- if (read(fd, real_addr, 512) != 512)
- goto fail;
- setup_sects = real_addr[0x1F1];
- if (!setup_sects)
- setup_sects = 4;
- if (read(fd, real_addr + 512, setup_sects * 512) !=
- setup_sects * 512)
- goto fail;
-
- /* load 32 bit code */
- size = read(fd, addr, 16 * 1024 * 1024);
- if (size < 0)
- goto fail;
- close(fd);
- return size;
- fail:
- close(fd);
- return -1;
-}
-
static long get_file_size(FILE *f)
{
long where, size;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-22 6:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-22 6:49 [Qemu-devel] [4233] x86: remove load_kernel() Aurelien Jarno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).