2004-05-23 Yoshinori K. Okuji <okuji@enbug.org>

* stage2/char_io.c (grub_isspace): Use a switch sentense instead
	of an if sentense, because that reduces the size.

	* lib/device.c (read_device_map): Change the max number of DRIVE
	to 127 from 8. This was too strict.

	* stage2/asm.S (stop_floppy): Call pusha and popa outside the
	block of real mode code. Reported by Guillem Jover
	<guillem@debian.org>.
This commit is contained in:
okuji committed 2004-05-23 16:45:45 +00:00
1 parent 31def8459d
commit e43909c66d
7 files changed
+47 -13

No files matched your search

+3 -3
View File
@@ -1,6 +1,6 @@
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 1999,2000,2001,2002 Free Software Foundation, Inc.
* Copyright (C) 1999,2000,2001,2002,2004 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -211,14 +211,14 @@ ENTRY(hard_stop)
* jumped to with a known state.
*/
ENTRY(stop_floppy)
pusha
call EXT_C(prot_to_real)
.code16
pusha
xorb %dl, %dl
int $0x13
popa
DATA32 call EXT_C(real_to_prot)
.code32
popa
ret
/*
+10 -2
View File
@@ -912,8 +912,16 @@ grub_tolower (int c)
int
grub_isspace (int c)
{
if (c == ' ' || c == '\t' || c == '\r' || c == '\n')
return 1;
switch (c)
{
case ' ':
case '\t':
case '\r':
case '\n':
return 1;
default:
break;
}
return 0;
}
+2 -1
View File
@@ -366,7 +366,8 @@ int
devwrite (int sector, int sector_count, char *buf)
{
#if defined(GRUB_UTIL) && defined(__linux__)
if (current_partition != 0xFFFFFF)
if (current_partition != 0xFFFFFF
&& is_disk_device (device_map, current_drive))
{
/* If the grub shell is running under Linux and the user wants to
embed a Stage 1.5 into a partition instead of a MBR, use system