From ef79dc933b08e9da766cd2435a4c2338262f8619 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 6 Jun 2011 15:11:50 -0400 Subject: [PATCH 2/2] Revert "Make changes in the following files for btrfs support:" These patches don't handle get_sector_size() and such correctly, so they break the build. This reverts commit 25acc2e0f4b7c9b45babadd2305e9c76c254c2ad. --- AUTHORS | 2 -- INSTALL | 3 --- configure.in | 7 ------- docs/grub.texi | 3 +-- grub/Makefile.am | 2 +- stage2/Makefile.am | 39 +++++++++++++-------------------------- stage2/builtins.c | 13 +------------ stage2/disk_io.c | 3 --- stage2/filesys.h | 15 ++------------- stage2/shared.h | 7 ++----- 10 files changed, 20 insertions(+), 74 deletions(-) diff --git a/AUTHORS b/AUTHORS index 236e423..ea8cb4a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -41,8 +41,6 @@ Kristoffer Branemyr added VSTa filesystem support. Serguei Tzukanov added JFS and XFS support. -Edward Shishkin added Btrfs support. - Jason Thomas added Linux DAC960 support and support for hiding/unhiding logical partitions, and did a significant bugfix for the terminal stuff. diff --git a/INSTALL b/INSTALL index a8bce4b..1ba68a6 100644 --- a/INSTALL +++ b/INSTALL @@ -216,9 +216,6 @@ operates. `--disable-xfs' Omit the XFS support in Stage 2. -`--disable-btrfs' - Omit the BtrFS support in Stage 2. - `--disable-ufs2' Omit the UFS2 support in Stage 2. diff --git a/configure.in b/configure.in index 1580801..e9745e6 100644 --- a/configure.in +++ b/configure.in @@ -362,13 +362,6 @@ if test x"$enable_xfs" != xno; then FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_XFS=1" fi -AC_ARG_ENABLE(btrfs, - [ --disable-btrfs disable BtrFS support in Stage 2]) - -if test x"$enable_btrfs" != xno; then - FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_BTRFS=1" -fi - AC_ARG_ENABLE(iso9660, [ --disable-iso9660 disable ISO9660 support in Stage 2]) diff --git a/docs/grub.texi b/docs/grub.texi index ca10751..5fd324d 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -285,7 +285,7 @@ devices, partitions, and files in a directory depending on context. Support multiple filesystem types transparently, plus a useful explicit blocklist notation. The currently supported filesystem types are @dfn{BSD FFS}, @dfn{DOS FAT16 and FAT32}, @dfn{Minix fs}, @dfn{Linux -ext2fs}, @dfn{ReiserFS}, @dfn{JFS}, @dfn{XFS}, @dfn{BtrFS}, and @dfn{VSTa +ext2fs}, @dfn{ReiserFS}, @dfn{JFS}, @dfn{XFS}, and @dfn{VSTa fs}. @xref{Filesystem}, for more information. @item Support automatic decompression @@ -1770,7 +1770,6 @@ itself. Usually, this is put in a filesystem, but that is not required. @itemx reiserfs_stage1_5 @itemx vstafs_stage1_5 @itemx xfs_stage1_5 -@itemx btrfs_stage1_5 These are called @dfn{Stage 1.5}, because they serve as a bridge between @file{stage1} and @file{stage2}, that is to say, Stage 1.5 is diff --git a/grub/Makefile.am b/grub/Makefile.am index c569174..d4353f7 100644 --- a/grub/Makefile.am +++ b/grub/Makefile.am @@ -8,7 +8,7 @@ endif AM_CPPFLAGS = -DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \ -DFSYS_ISO9660=1 -DFSYS_JFS=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 \ - -DFSYS_UFS2=1 -DFSYS_VSTAFS=1 -DFSYS_XFS=1 -DFSYS_BTRFS=1 \ + -DFSYS_UFS2=1 -DFSYS_VSTAFS=1 -DFSYS_XFS=1 \ -DUSE_MD5_PASSWORDS=1 -DSUPPORT_HERCULES=1 \ $(SERIAL_FLAGS) -I$(top_srcdir)/stage2 \ -I$(top_srcdir)/stage1 -I$(top_srcdir)/lib diff --git a/stage2/Makefile.am b/stage2/Makefile.am index 9dabffb..477d129 100644 --- a/stage2/Makefile.am +++ b/stage2/Makefile.am @@ -22,13 +22,12 @@ endif libgrub_a_SOURCES = boot.c builtins.c char_io.c cmdline.c common.c \ disk_io.c fsys_ext2fs.c fsys_fat.c fsys_ffs.c fsys_iso9660.c \ fsys_jfs.c fsys_minix.c fsys_reiserfs.c fsys_ufs2.c \ - fsys_vstafs.c fsys_xfs.c fsys_btrfs.c gunzip.c md5.c serial.c \ - sha256crypt.c sha512crypt.c stage2.c terminfo.c tparm.c graphics.c \ - efistubs.c + fsys_vstafs.c fsys_xfs.c gunzip.c md5.c serial.c sha256crypt.c \ + sha512crypt.c stage2.c terminfo.c tparm.c graphics.c efistubs.c libgrub_a_CFLAGS = $(GRUB_CFLAGS) -I$(top_srcdir)/lib \ -DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \ -DFSYS_ISO9660=1 -DFSYS_JFS=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 \ - -DFSYS_UFS2=1 -DFSYS_VSTAFS=1 -DFSYS_XFS=1 -DFSYS_BTRFS=1 \ + -DFSYS_UFS2=1 -DFSYS_VSTAFS=1 -DFSYS_XFS=1 \ -DUSE_MD5_PASSWORDS=1 -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 # Stage 2 and Stage 1.5's. @@ -41,26 +40,24 @@ EXTRA_PROGRAMS = nbloader.exec pxeloader.exec diskless.exec if DISKLESS_SUPPORT pkgdata_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \ ffs_stage1_5 iso9660_stage1_5 jfs_stage1_5 minix_stage1_5 \ - reiserfs_stage1_5 ufs2_stage1_5 vstafs_stage1_5 \ - xfs_stage1_5 btrfs_stage1_5 nbgrub pxegrub + reiserfs_stage1_5 ufs2_stage1_5 vstafs_stage1_5 xfs_stage1_5 \ + nbgrub pxegrub noinst_DATA = pre_stage2 start start_eltorito nbloader pxeloader diskless noinst_PROGRAMS = pre_stage2.exec start.exec start_eltorito.exec \ e2fs_stage1_5.exec fat_stage1_5.exec ffs_stage1_5.exec \ iso9660_stage1_5.exec jfs_stage1_5.exec minix_stage1_5.exec \ reiserfs_stage1_5.exec ufs2_stage1_5.exec vstafs_stage1_5.exec \ - xfs_stage1_5.exec btrfs_stage1_5.exec nbloader.exec \ - pxeloader.exec diskless.exec + xfs_stage1_5.exec nbloader.exec pxeloader.exec diskless.exec else pkgdata_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \ ffs_stage1_5 iso9660_stage1_5 jfs_stage1_5 minix_stage1_5 \ - reiserfs_stage1_5 ufs2_stage1_5 vstafs_stage1_5 xfs_stage1_5 \ - btrfs_stage1_5 + reiserfs_stage1_5 ufs2_stage1_5 vstafs_stage1_5 xfs_stage1_5 noinst_DATA = pre_stage2 start start_eltorito noinst_PROGRAMS = pre_stage2.exec start.exec start_eltorito.exec \ e2fs_stage1_5.exec fat_stage1_5.exec ffs_stage1_5.exec \ iso9660_stage1_5.exec jfs_stage1_5.exec minix_stage1_5.exec \ reiserfs_stage1_5.exec ufs2_stage1_5.exec vstafs_stage1_5.exec \ - xfs_stage1_5.exec btrfs_stage1_5.exec + xfs_stage1_5.exec endif MOSTLYCLEANFILES = $(noinst_PROGRAMS) @@ -101,8 +98,8 @@ STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ libstage2_a_SOURCES = boot.c builtins.c char_io.c cmdline.c common.c \ disk_io.c fsys_ext2fs.c fsys_fat.c fsys_ffs.c fsys_iso9660.c \ - fsys_jfs.c fsys_minix.c fsys_reiserfs.c fsys_ufs2.c fsys_vstafs.c \ - fsys_xfs.c fsys_btrfs.c gunzip.c md5.c serial.c sha256crypt.c \ + fsys_jfs.c fsys_minix.c fsys_reiserfs.c fsys_ufs2.c \ + fsys_vstafs.c fsys_xfs.c gunzip.c md5.c serial.c sha256crypt.c \ sha512crypt.c stage2.c terminfo.c tparm.c efistubs.c libstage2_a_CFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS) @@ -115,9 +112,9 @@ STAGE1_5_COMPILE = $(STAGE2_COMPILE) -DNO_DECOMPRESSION=1 -DSTAGE1_5=1 pre_stage2_exec_SOURCES = asm.S bios.c boot.c builtins.c char_io.c \ cmdline.c common.c console.c disk_io.c fsys_ext2fs.c \ fsys_fat.c fsys_ffs.c fsys_iso9660.c fsys_jfs.c fsys_minix.c \ - fsys_reiserfs.c fsys_ufs2.c fsys_vstafs.c fsys_xfs.c fsys_btrfs.c \ - gunzip.c hercules.c md5.c serial.c smp-imps.c sha256crypt.c \ - sha512crypt.c stage2.c terminfo.c tparm.c graphics.c + fsys_reiserfs.c fsys_ufs2.c fsys_vstafs.c fsys_xfs.c gunzip.c \ + hercules.c md5.c serial.c smp-imps.c sha256crypt.c sha512crypt.c \ + stage2.c terminfo.c tparm.c graphics.c pre_stage2_exec_CFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS) pre_stage2_exec_CCASFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS) pre_stage2_exec_LDFLAGS = $(PRE_STAGE2_LINK) @@ -256,16 +253,6 @@ xfs_stage1_5_exec_CCASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_XFS=1 \ xfs_stage1_5_exec_LDFLAGS = $(STAGE1_5_LINK) xfs_stage1_5_exec_LDADD = @LIBGCC@ -# For btrfs_stage1_5 target. -btrfs_stage1_5_exec_SOURCES = start.S asm.S common.c char_io.c \ - disk_io.c stage1_5.c fsys_btrfs.c bios.c -btrfs_stage1_5_exec_CFLAGS = $(STAGE1_5_COMPILE) -DFSYS_BTRFS=1 \ - -DNO_BLOCK_FILES=1 -btrfs_stage1_5_exec_CCASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_BTRFS=1 \ - -DNO_BLOCK_FILES=1 -btrfs_stage1_5_exec_LDFLAGS = $(STAGE1_5_LINK) -btrfs_stage1_5_exec_LDADD = @LIBGCC@ - # For iso9660_stage1_5 target. iso9660_stage1_5_exec_SOURCES = start_eltorito.S asm.S common.c char_io.c \ disk_io.c stage1_5.c fsys_iso9660.c bios.c diff --git a/stage2/builtins.c b/stage2/builtins.c index 6c6e3fa..178c889 100644 --- a/stage2/builtins.c +++ b/stage2/builtins.c @@ -2491,16 +2491,6 @@ install_func (char *arg, int flags) else #endif /* GRUB_UTIL */ { - /* - * FIXME: Ugly hack. - * Do not write to btrfs partition - * without a help of the file system! - */ - if (!strcmp(fsys_table[fsys_type].name, "btrfs")) - { - errnum = ERR_BAD_ARGUMENT; - goto fail; - } if (! devwrite (*saved_sector - part_start, 1, stage2_buffer)) goto fail; } @@ -4262,8 +4252,7 @@ setup_func (char *arg, int flags) {"minix", "/minix_stage1_5"}, {"reiserfs", "/reiserfs_stage1_5"}, {"vstafs", "/vstafs_stage1_5"}, - {"xfs", "/xfs_stage1_5"}, - {"btrfs", "/btrfs_stage1_5"} + {"xfs", "/xfs_stage1_5"} }; tmp_drive = saved_drive; diff --git a/stage2/disk_io.c b/stage2/disk_io.c index e07ca77..09a0b75 100644 --- a/stage2/disk_io.c +++ b/stage2/disk_io.c @@ -80,9 +80,6 @@ struct fsys_entry fsys_table[NUM_FSYS + 1] = # ifdef FSYS_XFS {"xfs", xfs_mount, xfs_read, xfs_dir, 0, 0}, # endif -# ifdef FSYS_BTRFS - {"btrfs", btrfs_mount, btrfs_read, btrfs_dir, 0, btrfs_embed}, -# endif # ifdef FSYS_UFS2 {"ufs2", ufs2_mount, ufs2_read, ufs2_dir, 0, ufs2_embed}, # endif diff --git a/stage2/filesys.h b/stage2/filesys.h index 9d159a8..4295e45 100644 --- a/stage2/filesys.h +++ b/stage2/filesys.h @@ -105,16 +105,6 @@ int xfs_dir (char *dirname); #define FSYS_XFS_NUM 0 #endif -#ifdef FSYS_BTRFS -#define FSYS_BTRFS_NUM 1 -int btrfs_mount (void); -int btrfs_read (char *buf, int len); -int btrfs_dir (char *dirname); -int btrfs_embed (int *start_sector, int needed_sectors); -#else -#define FSYS_BTRFS_NUM 0 -#endif - #ifdef FSYS_TFTP #define FSYS_TFTP_NUM 1 int tftp_mount (void); @@ -148,9 +138,8 @@ int iso9660_dir (char *dirname); #ifndef NUM_FSYS #define NUM_FSYS \ (FSYS_FFS_NUM + FSYS_FAT_NUM + FSYS_EXT2FS_NUM + FSYS_MINIX_NUM \ - + FSYS_REISERFS_NUM + FSYS_BTRFS_NUM + FSYS_VSTAFS_NUM + FSYS_JFS_NUM \ - + FSYS_XFS_NUM + FSYS_TFTP_NUM + FSYS_EFI_TFTP_NUM + FSYS_ISO9660_NUM \ - + FSYS_UFS2_NUM) + + FSYS_REISERFS_NUM + FSYS_VSTAFS_NUM + FSYS_JFS_NUM + FSYS_XFS_NUM \ + + FSYS_TFTP_NUM + FSYS_EFI_TFTP_NUM + FSYS_ISO9660_NUM + FSYS_UFS2_NUM) #endif /* defines for the block filesystem info area */ diff --git a/stage2/shared.h b/stage2/shared.h index 587f9a1..7a77744 100644 --- a/stage2/shared.h +++ b/stage2/shared.h @@ -215,9 +215,8 @@ extern void *grub_scratch_mem; #define STAGE2_ID_VSTAFS_STAGE1_5 6 #define STAGE2_ID_JFS_STAGE1_5 7 #define STAGE2_ID_XFS_STAGE1_5 8 -#define STAGE2_ID_BTRFS_STAGE1_5 9 -#define STAGE2_ID_ISO9660_STAGE1_5 10 -#define STAGE2_ID_UFS2_STAGE1_5 11 +#define STAGE2_ID_ISO9660_STAGE1_5 9 +#define STAGE2_ID_UFS2_STAGE1_5 10 #ifndef STAGE1_5 # define STAGE2_ID STAGE2_ID_STAGE2 @@ -238,8 +237,6 @@ extern void *grub_scratch_mem; # define STAGE2_ID STAGE2_ID_JFS_STAGE1_5 # elif defined(FSYS_XFS) # define STAGE2_ID STAGE2_ID_XFS_STAGE1_5 -# elif defined(FSYS_BTRFS) -# define STAGE2_ID STAGE2_ID_BTRFS_STAGE1_5 # elif defined(FSYS_ISO9660) # define STAGE2_ID STAGE2_ID_ISO9660_STAGE1_5 # elif defined(FSYS_UFS2) -- 1.7.5.2