From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JlkWk-0004Im-Hm for qemu-devel@nongnu.org; Tue, 15 Apr 2008 08:44:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JlkWh-0004Gg-WB for qemu-devel@nongnu.org; Tue, 15 Apr 2008 08:44:45 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JlkWh-0004GO-Rm for qemu-devel@nongnu.org; Tue, 15 Apr 2008 08:44:43 -0400 Received: from lizzard.sbs.de ([194.138.37.39]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JlkWh-0001Wf-AK for qemu-devel@nongnu.org; Tue, 15 Apr 2008 08:44:43 -0400 Received: from mail2.sbs.de (localhost [127.0.0.1]) by lizzard.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id m3FCiVu0032449 for ; Tue, 15 Apr 2008 14:44:31 +0200 Received: from [139.21.95.225] (mchn012c.mchh.siemens.de [139.21.95.225] (may be forged)) by mail2.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id m3FCiVfb017753 for ; Tue, 15 Apr 2008 14:44:31 +0200 Message-ID: <4804A330.9070802@siemens.com> Date: Tue, 15 Apr 2008 14:44:32 +0200 From: Jan Kiszka MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] x86: remove load_kernel Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org What is the point of the unused load_kernel() in hw/pc.c? Can't it simply be removed (to reduce the warning noise a bit)? Signed-off-by: Jan Kiszka --- hw/pc.c | 31 ------------------------------- 1 file changed, 31 deletions(-) Index: b/hw/pc.c =================================================================== --- a/hw/pc.c +++ b/hw/pc.c @@ -445,37 +445,6 @@ static void generate_bootsect(uint32_t g 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;