From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [4233] x86: remove load_kernel()
Date: Tue, 22 Apr 2008 06:49:43 +0000 [thread overview]
Message-ID: <E1JoCJz-0004m8-Su@cvs.savannah.gnu.org> (raw)
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;
reply other threads:[~2008-04-22 6:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1JoCJz-0004m8-Su@cvs.savannah.gnu.org \
--to=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).