/sbin/grub is always built and grub.8 is produced automatically

This commit is contained in:
okuji committed 1999-06-23 00:00:54 +00:00
1 parent 45d89b3d1a
commit a0ca5d0c06
21 files changed
+697 -92

No files matched your search

+1 -2
View File
@@ -1,5 +1,4 @@
EXTRA_PROGRAMS = grub
sbin_PROGRAMS = $(sbingrub)
sbin_PROGRAMS = grub
CLEANFILES = $(EXTRA_PROGRAMS)
COMPILE = $(CC) -DGRUB_UTIL=1 -fwritable-strings $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+1 -3
View File
@@ -70,11 +70,9 @@ VERSION = @VERSION@
host_cpu = @host_cpu@
host_vendor = @host_vendor@
install_sh = @install_sh@
sbingrub = @sbingrub@
EXTRA_PROGRAMS = grub
sbin_PROGRAMS = $(sbingrub)
sbin_PROGRAMS = grub
CLEANFILES = $(EXTRA_PROGRAMS)
COMPILE = $(CC) -DGRUB_UTIL=1 -fwritable-strings $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+16 -2
View File
@@ -39,13 +39,14 @@ int grub_stage2 (void);
#include <time.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#ifdef __linux__
# include <sys/ioctl.h> /* ioctl */
# include <linux/hdreg.h> /* HDIO_GETGEO */
/* FIXME: only include if libc doesn't have large file support. */
# include <unistd.h>
# include <linux/unistd.h> /* _llseek */
# include <linux/fs.h> /* BLKFLSBUF */
#endif /* __linux__ */
/* Simulated memory sizes. */
@@ -223,10 +224,16 @@ grub_stage2 (void)
}
#endif
/* Make sure that actual writing is done. */
sync ();
/* Set our stack, and go for it. */
simstack = (char *) PROTSTACKINIT;
doit ();
/* I don't know if this is necessary really. */
sync ();
#ifdef HAVE_LIBCURSES
if (use_curses)
endwin ();
@@ -235,7 +242,14 @@ grub_stage2 (void)
/* Close off the file descriptors we used. */
for (i = 0; i < NUM_DISKS; i ++)
if (disks[i].flags != -1)
close (disks[i].flags);
{
#ifdef __linux__
/* In Linux, invalidate the buffer cache. In other OSes, reboot
is one of the solutions... */
ioctl (disks[i].flags, BLKFLSBUF, 0);
#endif
close (disks[i].flags);
}
/* Release memory. */
for (i = 0; i < NUM_DISKS; i++)
+6
View File
@@ -107,6 +107,12 @@ main (int argc, char **argv)
{
int c;
int hold = 0;
/* First of all, call sync so that all in-core data is scheduled to be
actually written to disks. This is very important because GRUB does
not use ordinary stdio interface but raw devices. */
sync ();
program_name = argv[0];
default_boot_drive = boot_drive;
default_install_partition = install_partition;