Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 79219 | Differences between
and this patch

Collapse All | Expand All

(-)grub-0.95.20040823.clean/grub/Makefile.am (-1 / +1 lines)
Lines 13-19 Link Here
13
	$(SERIAL_FLAGS) -I$(top_srcdir)/stage2 \
13
	$(SERIAL_FLAGS) -I$(top_srcdir)/stage2 \
14
	-I$(top_srcdir)/stage1 -I$(top_srcdir)/lib
14
	-I$(top_srcdir)/stage1 -I$(top_srcdir)/lib
15
15
16
AM_CFLAGS = $(GRUB_CFLAGS) -fwritable-strings
16
AM_CFLAGS = $(GRUB_CFLAGS)
17
17
18
grub_SOURCES = main.c asmstub.c
18
grub_SOURCES = main.c asmstub.c
19
grub_LDADD = ../stage2/libgrub.a  ../lib/libcommon.a $(GRUB_LIBS)
19
grub_LDADD = ../stage2/libgrub.a  ../lib/libcommon.a $(GRUB_LIBS)
(-)grub-0.95.20040823.clean/grub/Makefile.in (-1 / +1 lines)
Lines 185-191 Link Here
185
	$(SERIAL_FLAGS) -I$(top_srcdir)/stage2 \
185
	$(SERIAL_FLAGS) -I$(top_srcdir)/stage2 \
186
	-I$(top_srcdir)/stage1 -I$(top_srcdir)/lib
186
	-I$(top_srcdir)/stage1 -I$(top_srcdir)/lib
187
187
188
AM_CFLAGS = $(GRUB_CFLAGS) -fwritable-strings
188
AM_CFLAGS = $(GRUB_CFLAGS)
189
grub_SOURCES = main.c asmstub.c
189
grub_SOURCES = main.c asmstub.c
190
grub_LDADD = ../stage2/libgrub.a  ../lib/libcommon.a $(GRUB_LIBS)
190
grub_LDADD = ../stage2/libgrub.a  ../lib/libcommon.a $(GRUB_LIBS)
191
all: all-am
191
all: all-am
(-)grub-0.95.20040823.clean/lib/device.c (-1 / +3 lines)
Lines 828-836 Link Here
828
is_disk_device (char **map, int drive)
828
is_disk_device (char **map, int drive)
829
{
829
{
830
  struct stat st;
830
  struct stat st;
831
  int retval;
831
  
832
  
832
  assert (map[drive] != 0);
833
  assert (map[drive] != 0);
833
  assert (stat (map[drive], &st) == 0);
834
  retval = stat (map[drive], &st);
835
  assert (retval == 0);
834
  /* For now, disk devices under Linux are all block devices.  */
836
  /* For now, disk devices under Linux are all block devices.  */
835
  return S_ISBLK (st.st_mode);
837
  return S_ISBLK (st.st_mode);
836
}
838
}
(-)grub-0.95.20040823.clean/stage2/boot.c (-2 / +5 lines)
Lines 824-831 Link Here
824
    moveto = (mbi.mem_upper + 0x400) << 10;
824
    moveto = (mbi.mem_upper + 0x400) << 10;
825
  
825
  
826
  moveto = (moveto - len) & 0xfffff000;
826
  moveto = (moveto - len) & 0xfffff000;
827
  max_addr = (lh->header == LINUX_MAGIC_SIGNATURE && lh->version >= 0x0203
827
  max_addr = LINUX_INITRD_MAX_ADDRESS;
828
	      ? lh->initrd_addr_max : LINUX_INITRD_MAX_ADDRESS);
828
  if (lh->header == LINUX_MAGIC_SIGNATURE &&
829
      lh->version >= 0x0203 &&
830
      lh->initrd_addr_max < max_addr)
831
    max_addr = lh->initrd_addr_max;
829
  if (moveto + len >= max_addr)
832
  if (moveto + len >= max_addr)
830
    moveto = (max_addr - len) & 0xfffff000;
833
    moveto = (max_addr - len) & 0xfffff000;
831
  
834
  
(-)grub-0.95.20040823.clean/stage2/builtins.c (+14 lines)
Lines 1835-1843 Link Here
1835
#ifdef GRUB_UTIL
1835
#ifdef GRUB_UTIL
1836
      else if (grub_memcmp ("--stage2=", arg, sizeof ("--stage2=") - 1) == 0)
1836
      else if (grub_memcmp ("--stage2=", arg, sizeof ("--stage2=") - 1) == 0)
1837
	{
1837
	{
1838
	  int fd;
1838
	  stage2_os_file = arg + sizeof ("--stage2=") - 1;
1839
	  stage2_os_file = arg + sizeof ("--stage2=") - 1;
1839
	  arg = skip_to (0, arg);
1840
	  arg = skip_to (0, arg);
1840
	  nul_terminate (stage2_os_file);
1841
	  nul_terminate (stage2_os_file);
1842
1843
#if defined(__linux__) && defined (FSYS_REISERFS)
1844
	  if ((fd=open(stage2_os_file, O_RDONLY)) >= 0)
1845
	    {
1846
	      struct statfs buf;
1847
	      /* see if the file sits on a reiserfs,
1848
		 and try do defragment it if so. */
1849
	      fstatfs(fd, &buf);
1850
	      if (buf.f_type == REISERFS_SUPER_MAGIC)
1851
		ioctl (fd, REISERFS_IOC_UNPACK, 1);
1852
	    }
1853
#endif	/* __linux__ && FSYS_REISERFS */
1854
1841
	}
1855
	}
1842
#endif /* GRUB_UTIL */
1856
#endif /* GRUB_UTIL */
1843
      else
1857
      else
(-)grub-0.95.20040823.clean/stage2/filesys.h (+10 lines)
Lines 73-78 Link Here
73
int reiserfs_read (char *buf, int len);
73
int reiserfs_read (char *buf, int len);
74
int reiserfs_dir (char *dirname);
74
int reiserfs_dir (char *dirname);
75
int reiserfs_embed (int *start_sector, int needed_sectors);
75
int reiserfs_embed (int *start_sector, int needed_sectors);
76
#if defined(__linux__) && defined (GRUB_UTIL)
77
#include <sys/types.h>
78
#include <sys/stat.h>
79
#include <sys/ioctl.h>
80
#include <sys/statfs.h>
81
#include <fcntl.h>
82
/* from <linux/reiserfs_fs.h> */
83
#define REISERFS_SUPER_MAGIC 0x52654973
84
#define REISERFS_IOC_UNPACK  _IOW(0xCD,1,long)
85
#endif
76
#else
86
#else
77
#define FSYS_REISERFS_NUM 0
87
#define FSYS_REISERFS_NUM 0
78
#endif
88
#endif
(-)grub-0.95.20040823.clean/stage2/Makefile.am (-2 / +1 lines)
Lines 24-31 Link Here
24
	-DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \
24
	-DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \
25
	-DFSYS_ISO9660=1 -DFSYS_JFS=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 \
25
	-DFSYS_ISO9660=1 -DFSYS_JFS=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 \
26
	-DFSYS_UFS2=1 -DFSYS_VSTAFS=1 -DFSYS_XFS=1 \
26
	-DFSYS_UFS2=1 -DFSYS_VSTAFS=1 -DFSYS_XFS=1 \
27
	-DUSE_MD5_PASSWORDS=1 -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 \
27
	-DUSE_MD5_PASSWORDS=1 -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1
28
	-fwritable-strings
29
28
30
# Stage 2 and Stage 1.5's.
29
# Stage 2 and Stage 1.5's.
31
pkglibdir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
30
pkglibdir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
(-)grub-0.95.20040823.clean/stage2/Makefile.in (-2 / +1 lines)
Lines 579-586 Link Here
579
	-DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \
579
	-DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \
580
	-DFSYS_ISO9660=1 -DFSYS_JFS=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 \
580
	-DFSYS_ISO9660=1 -DFSYS_JFS=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 \
581
	-DFSYS_UFS2=1 -DFSYS_VSTAFS=1 -DFSYS_XFS=1 \
581
	-DFSYS_UFS2=1 -DFSYS_VSTAFS=1 -DFSYS_XFS=1 \
582
	-DUSE_MD5_PASSWORDS=1 -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 \
582
	-DUSE_MD5_PASSWORDS=1 -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1
583
	-fwritable-strings
584
583
585
@DISKLESS_SUPPORT_FALSE@pkglib_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \
584
@DISKLESS_SUPPORT_FALSE@pkglib_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \
586
@DISKLESS_SUPPORT_FALSE@	ffs_stage1_5 iso9660_stage1_5 jfs_stage1_5 minix_stage1_5 \
585
@DISKLESS_SUPPORT_FALSE@	ffs_stage1_5 iso9660_stage1_5 jfs_stage1_5 minix_stage1_5 \
(-)grub-0.95.20040823.clean/util/mbchk.c (-1 / +3 lines)
Lines 59-65 Link Here
59
  int i;
59
  int i;
60
  char buf[8192];
60
  char buf[8192];
61
61
62
  if (fread (buf, 1, 8192, fp) < 0)
62
  fread (buf, 1, 8192, fp);
63
  
64
  if (ferror(fp))
63
    {
65
    {
64
      fprintf (stderr, "%s: Read error.\n", filename);
66
      fprintf (stderr, "%s: Read error.\n", filename);
65
      return 0;
67
      return 0;

Return to bug 79219