From 9015cd0364b0f2a4403c6bff6d50f05eed4c219d Mon Sep 17 00:00:00 2001 From: okuji Date: Sun, 3 Sep 2000 05:08:50 +0000 Subject: [PATCH] fix a typo in grub-install, and fix open flags in install_func. --- ChangeLog | 6 ++++++ stage2/builtins.c | 4 ++-- util/grub-install.in | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b2488a70c..8caa8f2e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-09-03 OKUJI Yoshinori + + * util/grub-install.in: Fix a typo: grub_dir -> grubdir. + * stage2/builtins.c (install_func) [GRUB_UTIL]: Open a Stage 2 + with "r+" instead of "r", as GRUB needs to overwrite it. + 2000-09-02 OKUJI Yoshinori * stage2/stage2.c (run_menu): Don't use either `p' or `n' to diff --git a/stage2/builtins.c b/stage2/builtins.c index f12e3f033..8c216cad9 100644 --- a/stage2/builtins.c +++ b/stage2/builtins.c @@ -1871,7 +1871,7 @@ install_func (char *arg, int flags) { FILE *fp; - fp = fopen (stage2_os_file, "r"); + fp = fopen (stage2_os_file, "r+"); if (! fp) { errnum = ERR_FILE_NOT_FOUND; @@ -1931,7 +1931,7 @@ install_func (char *arg, int flags) { FILE *fp; - fp = fopen (stage2_os_file, "r"); + fp = fopen (stage2_os_file, "r+"); if (! fp) { errnum = ERR_FILE_NOT_FOUND; diff --git a/util/grub-install.in b/util/grub-install.in index 55951aacd..6634d572d 100644 --- a/util/grub-install.in +++ b/util/grub-install.in @@ -262,7 +262,7 @@ test -x /bin/tempfile && log_file=`tempfile --prefix=grub` # Now perform the installation. $grub_shell --batch --device-map=$device_map <$log_file root $root_drive -setup $force_lba --stage2=$grub_dir/stage2 $install_drive +setup $force_lba --stage2=$grubdir/stage2 $install_drive quit EOF