From bda2eea18dc23bff34f6717eb94f59c3140440dd Mon Sep 17 00:00:00 2001 From: okuji Date: Sun, 10 Sep 2000 16:45:15 +0000 Subject: [PATCH] add an additional minix partition type. --- ChangeLog | 9 +++++++++ stage2/fsys_minix.c | 4 ++-- stage2/pc_slice.h | 5 +++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e1fc494ec..6e78e56fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2000-09-11 OKUJI Yoshinori + + Reported by Alessandro Rubini: + * stage2/fsys_minix.c (minix_mount): Check if CURRENT_SLICE is a + partition type for minix fs, using the macro + IS_PC_SLICE_TYPE_MINIX. + * stage2/pc_slice.h (PC_SLICE_TYPE_LINUX_MINIX): New macro. + (IS_PC_SLICE_TYPE_MINIX): Likewise. + 2000-09-09 Alessandro Rubini * stage1/stage1.S (notification_string): Print "GRUB " instead diff --git a/stage2/fsys_minix.c b/stage2/fsys_minix.c index f84c828ed..a7a7de9e6 100644 --- a/stage2/fsys_minix.c +++ b/stage2/fsys_minix.c @@ -1,6 +1,6 @@ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 1999 Free Software Foundation, Inc. + * Copyright (C) 1999, 2000 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 @@ -161,7 +161,7 @@ int minix_mount (void) { if (((current_drive & 0x80 || current_slice != 0)) - && (current_slice != PC_SLICE_TYPE_MINIX) + && IS_PC_SLICE_TYPE_MINIX (current_slice) && ! IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_OTHER)) return 0; /* The partition is not of MINIX type */ diff --git a/stage2/pc_slice.h b/stage2/pc_slice.h index cf860b185..4b7f5a7f1 100644 --- a/stage2/pc_slice.h +++ b/stage2/pc_slice.h @@ -110,6 +110,7 @@ #define PC_SLICE_TYPE_FAT16_LBA 0xe #define PC_SLICE_TYPE_WIN95_EXTENDED 0xf #define PC_SLICE_TYPE_MINIX 0x80 +#define PC_SLICE_TYPE_LINUX_MINIX 0x81 #define PC_SLICE_TYPE_EXT2FS 0x83 #define PC_SLICE_TYPE_LINUX_EXTENDED 0x85 @@ -130,6 +131,10 @@ || ((type) == PC_SLICE_TYPE_WIN95_EXTENDED) \ || ((type) == PC_SLICE_TYPE_LINUX_EXTENDED)) +#define IS_PC_SLICE_TYPE_MINIX(type) \ + (((type) == PC_SLICE_TYPE_MINIX) \ + || ((type) == PC_SLICE_TYPE_LINUX_MINIX)) + /* these ones are special, as they use their own partitioning scheme to subdivide the PC partitions from there. */ #define PC_SLICE_TYPE_FREEBSD 0xa5