Debian grub-0.5-2 release.

This commit is contained in:
gord committed 1999-02-22 03:11:52 +00:00
1 parent b117211d4a
commit 6b874486ce
4 files changed
+150 -193

No files matched your search

+21 -16
View File
@@ -33,8 +33,8 @@ void (*debug_fs)(int) = NULL;
void (*debug_fs_func)(int) = NULL;
#endif /* NO_FANCY_STUFF */
/* these have the same format as "boot_drive" and "install_partition", but
are meant to be working values */
/* These have the same format as "boot_drive" and "install_partition", but
are meant to be working values. */
unsigned long current_drive = 0xFF;
unsigned long current_partition;
@@ -543,7 +543,13 @@ open_partition(void)
/* XX used for device completion in 'set_device' and 'print_completions' */
static int incomplete, disk_choice, part_choice;
static int incomplete, disk_choice;
static enum
{
PART_UNSPECIFIED = 0,
PART_DISK,
PART_CHOSEN,
} part_choice;
char *
@@ -554,7 +560,7 @@ set_device(char *device)
incomplete = 0;
disk_choice = 1;
part_choice = 0;
part_choice = PART_UNSPECIFIED;
current_drive = saved_drive;
current_partition = 0xFFFFFF;
@@ -580,11 +586,12 @@ set_device(char *device)
if (*device == ')')
{
part_choice = 2;
part_choice = PART_CHOSEN;
retval++;
}
if (*device == ',')
{
/* Either an absolute PC or BSD partition. */
disk_choice = 0;
part_choice++;
device++;
@@ -620,7 +627,7 @@ set_device(char *device)
if (*device == ')')
{
if (part_choice == 1)
if (part_choice == PART_DISK)
{
current_partition = saved_partition;
part_choice++;
@@ -751,15 +758,14 @@ print_fsys_type(void)
printf(" Filesystem type ");
if (fsys_type != NUM_FSYS)
printf("is %s\n", fsys_table[fsys_type].name);
printf("is %s, ", fsys_table[fsys_type].name);
else
{
printf("unknown, ");
if (current_partition == 0xFFFFFF)
printf("using whole disk\n");
else
printf("partition type 0x%x\n", current_slice);
}
printf("unknown, ");
if (current_partition == 0xFFFFFF)
printf("using whole disk\n");
else
printf("partition type 0x%x\n", current_slice);
}
/*
@@ -801,7 +807,7 @@ print_completions(char *filename)
else
{
/* partition completions */
if (part_choice == 1)
if (part_choice == PART_DISK)
{
printf(" Possible partitions are:\n");
real_open_partition(1);
@@ -1064,4 +1070,3 @@ dir(char *dirname)
return (*(fsys_table[fsys_type].dir_func))(dirname);
}
+20 -8
View File
@@ -27,17 +27,22 @@
#define MAXINT 0x7FFFFFFF
/* 512-byte scratch area */
#define SCRATCHADDR 0x77e00
#define SCRATCHSEG 0x77e0
/*
* This is the location of the raw device buffer. It is 31.5K
* in size.
*/
#define BUFFERSEG 0x7000
#define BUFFERADDR 0x70000
#define BUFFERLEN 0x7e00
#define BUFFERADDR 0x70000
#define BUFFERSEG 0x7000
/* 512-byte scratch area */
#define SCRATCHSEG 0x77e0
#define SCRATCHADDR 0x77e00
#if (BUFFERADDR + BUFFERLEN) != SCRATCHADDR
# error "scratch area isn't at the end of the device buffer"
#endif
/*
* BIOS disk defines
@@ -47,12 +52,21 @@
#define BIOSDISK_ERROR_GEOMETRY 0x100
/*
* This is the location of the filesystem (not raw device) buffer.
* This is the filesystem (not raw device) buffer.
* It is 32K in size, do not overrun!
*/
#define FSYS_BUFLEN 0x8000
#define FSYS_BUF 0x68000
#if (FSYS_BUF % 16) != 0
# error "FSYS_BUF is not segment-aligned"
#endif
#if (FSYS_BUF + FSYS_BUFLEN) != BUFFERADDR
# error "device buffer buffer isn't at the end of the filesystem buffer"
#endif
/*
* Linux setup parameters
*/
@@ -119,8 +133,6 @@
* defines for use when switching between real and protected mode
*/
#define data32 .byte 0x66
#define addr32 .byte 0x67
#define CR0_PE_ON 0x1
#define CR0_PE_OFF 0xfffffffe
#define PROT_MODE_CSEG 0x8
+14 -7
View File
@@ -170,7 +170,7 @@ restart:
commands before booting, or \'c\' for a command-line.");
else
printf(
" Press \'b\' to boot, enter to edit the selected command in the
" Press \'b\' to boot, \'e\' to edit the selected command in the
boot sequence, \'c\' for a command-line, \'o\' to open a new line
after (\'O\' for before) the selected line, \'d\' to remove the
selected line, or escape to go back to the main menu.");
@@ -336,8 +336,7 @@ restart:
}
else
{
if ((config_entries && (c == 'e'))
|| (!config_entries && ((c == '\n') || (c == '\r'))))
if (c == 'e')
{
int num_entries = 0, i = 0;
char *new_heap;
@@ -435,14 +434,22 @@ restart:
if (!(c = enter_cmdline(cur_entry, heap)))
{
cur_entry = NULL;
first_entry = 0;
entryno = fallback;
fallback = -1;
if (fallback < 0)
break;
else
{
cur_entry = NULL;
first_entry = 0;
entryno = fallback;
fallback = -1;
}
}
}
while (!c);
/* Both the entry and the fallback failed, so wait for input. */
printf("Failed!\n Press any key to continue...");
getkey();
goto restart;
}