Hello!
ChangeLog:
* stage2/pc_slice.h: new macro IS_PC_SLICE_TYPE_EXTENDED
* stage2/disk_io.c: don't count Win95 extended partitions
that are not in MBR
* grub/asmstub.c: added device names for FreeBSD
Pavel Roskin
Index: grub/asmstub.c
===================================================================
RCS file: /usr/home/proski/cvs/grub/grub/asmstub.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- grub/asmstub.c 1999/09/12 17:32:32 1.2
+++ grub/asmstub.c 1999/09/12 19:43:08 1.3
@@ -248,8 +248,8 @@
static void
get_floppy_disk_name (char *name, int unit)
{
-#if defined(__linux__) || defined(__GNU__)
- /* GNU/Linux and GNU/Hurd */
+#if defined(__linux__) || defined(__GNU__) || defined(__FreeBSD__)
+ /* GNU/Linux, GNU/Hurd, FreeBSD */
sprintf (name, "/dev/fd%d", unit);
#else
# warning "BIOS drives cannot be guessed in your operating system."
@@ -267,6 +267,9 @@
#elif defined(__GNU__)
/* GNU/Hurd */
sprintf (name, "/dev/hd%d", unit);
+#elif defined(__FreeBSD__)
+ /* FreeBSD */
+ sprintf (name, "/dev/wd%d", unit);
#else
# warning "BIOS drives cannot be guessed in your operating system."
/* Set NAME to a bogus string. */
@@ -283,6 +286,9 @@
#elif defined(__GNU__)
/* GNU/Hurd */
sprintf (name, "/dev/sd%d", unit);
+#elif defined(__FreeBSD__)
+ /* FreeBSD */
+ sprintf (name, "/dev/da%d", unit);
#else
# warning "BIOS drives cannot be guessed in your operating system."
/* Set NAME to a bogus string. */
Index: stage2/disk_io.c
===================================================================
RCS file: /usr/home/proski/cvs/grub/stage2/disk_io.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 disk_io.c
--- stage2/disk_io.c 1999/09/12 16:56:53 1.1.1.1
+++ stage2/disk_io.c 1999/09/12 20:04:30
@@ -511,8 +511,7 @@
/*
* Is this an extended partition?
*/
- if (current_slice == PC_SLICE_TYPE_EXTENDED
- || current_slice == PC_SLICE_TYPE_WIN95_EXTENDED)
+ if (IS_PC_SLICE_TYPE_EXTENDED (current_slice))
{
if (ext == -1)
{
@@ -560,8 +559,7 @@
* to one per valid entry.
*/
if (slice_no < PC_SLICE_MAX
- || (current_slice != PC_SLICE_TYPE_EXTENDED
- && current_slice != PC_SLICE_TYPE_EXTENDED
+ || (!IS_PC_SLICE_TYPE_EXTENDED (current_slice)
&& current_slice != PC_SLICE_TYPE_NONE))
slice_no++;
}
Index: stage2/pc_slice.h
===================================================================
RCS file: /usr/home/proski/cvs/grub/stage2/pc_slice.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 pc_slice.h
--- stage2/pc_slice.h 1999/09/12 16:56:53 1.1.1.1
+++ stage2/pc_slice.h 1999/09/12 20:02:07
@@ -117,7 +117,11 @@
|| ((type) == PC_SLICE_TYPE_FAT16_LBA) \
|| ((type) == PC_SLICE_TYPE_FAT32) \
|| ((type) == PC_SLICE_TYPE_FAT32_LBA))
-
+
+#define IS_PC_SLICE_TYPE_EXTENDED(type) \
+ (((type) == PC_SLICE_TYPE_EXTENDED) \
+ || ((type) == PC_SLICE_TYPE_WIN95_EXTENDED))
+
/* these ones are special, as they use thier own partitioning scheme
to subdivide the PC partitions from there. */