ia64/xen-unstable

changeset 18517:2e8ad0c35792

pvgrub: Allow to work with a partitionless virtual disc.

From: Bastian Blank <bastian@waldi.eu.org>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Sep 18 10:43:08 2008 +0100 (2008-09-18)
parents 79459028af39
children a1e86caf83a3
files stubdom/grub.patches/50fs_fulldisk.diff
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/stubdom/grub.patches/50fs_fulldisk.diff	Thu Sep 18 10:43:08 2008 +0100
     1.3 @@ -0,0 +1,72 @@
     1.4 +diff -urN grub-0.97.orig/stage2/fsys_ext2fs.c grub-0.97/stage2/fsys_ext2fs.c
     1.5 +--- grub-0.97.orig/stage2/fsys_ext2fs.c	2004-08-08 18:19:18.000000000 +0000
     1.6 ++++ grub-0.97/stage2/fsys_ext2fs.c	2008-09-16 19:31:15.000000000 +0000
     1.7 +@@ -254,7 +254,7 @@
     1.8 + {
     1.9 +   int retval = 1;
    1.10 + 
    1.11 +-  if ((((current_drive & 0x80) || (current_slice != 0))
    1.12 ++  if ((((current_slice != 0))
    1.13 +        && (current_slice != PC_SLICE_TYPE_EXT2FS)
    1.14 +        && (current_slice != PC_SLICE_TYPE_LINUX_RAID)
    1.15 +        && (! IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_EXT2FS))
    1.16 +diff -urN grub-0.97.orig/stage2/fsys_fat.c grub-0.97/stage2/fsys_fat.c
    1.17 +--- grub-0.97.orig/stage2/fsys_fat.c	2005-03-15 16:52:00.000000000 +0000
    1.18 ++++ grub-0.97/stage2/fsys_fat.c	2008-09-16 19:31:26.000000000 +0000
    1.19 +@@ -70,7 +70,7 @@
    1.20 +   __u32 magic, first_fat;
    1.21 +   
    1.22 +   /* Check partition type for harddisk */
    1.23 +-  if (((current_drive & 0x80) || (current_slice != 0))
    1.24 ++  if (((current_slice != 0))
    1.25 +       && ! IS_PC_SLICE_TYPE_FAT (current_slice)
    1.26 +       && (! IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_MSDOS)))
    1.27 +     return 0;
    1.28 +diff -urN grub-0.97.orig/stage2/fsys_ffs.c grub-0.97/stage2/fsys_ffs.c
    1.29 +--- grub-0.97.orig/stage2/fsys_ffs.c	2003-07-09 11:45:52.000000000 +0000
    1.30 ++++ grub-0.97/stage2/fsys_ffs.c	2008-09-16 19:31:32.000000000 +0000
    1.31 +@@ -82,7 +82,7 @@
    1.32 + {
    1.33 +   int retval = 1;
    1.34 + 
    1.35 +-  if ((((current_drive & 0x80) || (current_slice != 0))
    1.36 ++  if ((((current_slice != 0))
    1.37 +        && ! IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_BSDFFS))
    1.38 +       || part_length < (SBLOCK + (SBSIZE / DEV_BSIZE))
    1.39 +       || !devread (SBLOCK, 0, SBSIZE, (char *) SUPERBLOCK)
    1.40 +diff -urN grub-0.97.orig/stage2/fsys_minix.c grub-0.97/stage2/fsys_minix.c
    1.41 +--- grub-0.97.orig/stage2/fsys_minix.c	2003-07-09 11:45:53.000000000 +0000
    1.42 ++++ grub-0.97/stage2/fsys_minix.c	2008-09-16 19:32:01.000000000 +0000
    1.43 +@@ -160,7 +160,7 @@
    1.44 + int
    1.45 + minix_mount (void)
    1.46 + {
    1.47 +-  if (((current_drive & 0x80) || current_slice != 0)
    1.48 ++  if ((current_slice != 0)
    1.49 +       && ! IS_PC_SLICE_TYPE_MINIX (current_slice)
    1.50 +       && ! IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_OTHER))
    1.51 +     return 0;			/* The partition is not of MINIX type */
    1.52 +diff -urN grub-0.97.orig/stage2/fsys_ufs2.c grub-0.97/stage2/fsys_ufs2.c
    1.53 +--- grub-0.97.orig/stage2/fsys_ufs2.c	2004-06-19 12:17:52.000000000 +0000
    1.54 ++++ grub-0.97/stage2/fsys_ufs2.c	2008-09-16 19:32:32.000000000 +0000
    1.55 +@@ -87,7 +87,7 @@
    1.56 +   sblockloc = -1;
    1.57 +   type = 0;
    1.58 +   
    1.59 +-  if (! (((current_drive & 0x80) || (current_slice != 0))
    1.60 ++  if (! (((current_slice != 0))
    1.61 + 	 && ! IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_BSDFFS)))
    1.62 +     {
    1.63 +       for (i = 0; sblock_try[i] != -1; ++i)
    1.64 +diff -urN grub-0.97.orig/stage2/fsys_vstafs.c grub-0.97/stage2/fsys_vstafs.c
    1.65 +--- grub-0.97.orig/stage2/fsys_vstafs.c	2003-07-09 11:45:53.000000000 +0000
    1.66 ++++ grub-0.97/stage2/fsys_vstafs.c	2008-09-16 19:32:39.000000000 +0000
    1.67 +@@ -47,7 +47,7 @@
    1.68 + {
    1.69 +   int retval = 1;
    1.70 +   
    1.71 +-  if( (((current_drive & 0x80) || (current_slice != 0))
    1.72 ++  if( (((current_slice != 0))
    1.73 +        && current_slice != PC_SLICE_TYPE_VSTAFS)
    1.74 +       ||  ! devread (0, 0, BLOCK_SIZE, (char *) FSYS_BUF)
    1.75 +       ||  FIRST_SECTOR->fs_magic != 0xDEADFACE)