2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
* kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is negative, unload the module. * util/i386/pc/grub-setup.c (setup): The name of the PC partition map is "pc_partition_map" but not "pc". (usage): Fix the description. The options are --boot-image and --core-image but not --boot-file or --core-file. (main): If not specified explicitly, make BOOT_FILE and CORE_FILE based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or DEFAULT_DIRECTORY. * util/i386/pc/grub-install.in: Do not specify --boot-file or --core-file. Specify INSTALL_DEVICE as an argument. * util/console.c: Include config.h. [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h. [HAVE_NCURSES_H]: Include ncurses.h. [HAVE_CURSES_H]: Include curses.h. [!A_NORMAL] (A_NORMAL): Defined as zero. [!A_STANDOUT] (A_STANDOUT): Likewise. * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of -lncurses. * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise. * configure.ac: Check for curses libraries and headers. * Makefile.in (LIBCURSES): New variable. * genmk.rb (Script::rule): Set the executable bits. * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The name of the PC partition map is "pc_partition_map" but not "pc".
This commit is contained in:
parent
0e1430737f
commit
f4917dfdd6
15 changed files with 386 additions and 16 deletions
|
@ -18,7 +18,24 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <curses.h>
|
||||
#include <config.h>
|
||||
|
||||
#if defined(HAVE_NCURSES_CURSES_H)
|
||||
# include <ncurses/curses.h>
|
||||
#elif defined(HAVE_NCURSES_H)
|
||||
# include <ncurses.h>
|
||||
#elif defined(HAVE_CURSES_H)
|
||||
# include <curses.h>
|
||||
#endif
|
||||
|
||||
/* For compatibility. */
|
||||
#ifndef A_NORMAL
|
||||
# define A_NORMAL 0
|
||||
#endif /* ! A_NORMAL */
|
||||
#ifndef A_STANDOUT
|
||||
# define A_STANDOUT 0
|
||||
#endif /* ! A_STANDOUT */
|
||||
|
||||
#include <grub/machine/console.h>
|
||||
#include <grub/term.h>
|
||||
#include <grub/types.h>
|
||||
|
|
|
@ -739,7 +739,7 @@ grub_util_biosdisk_get_grub_dev (const char *os_dev)
|
|||
{
|
||||
struct grub_pc_partition *pcdata = 0;
|
||||
|
||||
if (!strcmp (partition->partmap->name, "pc"))
|
||||
if (strcmp (partition->partmap->name, "pc_partition_map") == 0)
|
||||
pcdata = partition->data;
|
||||
|
||||
if (pcdata)
|
||||
|
|
|
@ -220,8 +220,8 @@ modules="$modules $fs_module _chain pc"
|
|||
$grub_mkimage --output=${grubdir}/core.img $modules || exit 1
|
||||
|
||||
# Now perform the installation.
|
||||
$grub_setup --boot-file=${grubdir}/boot.img --core-file=${grubdir}/core.img \
|
||||
--directory=${grubdir} --device-map=${device_map} || exit 1
|
||||
$grub_setup --directory=${grubdir} --device-map=${device_map} \
|
||||
${install_device} || exit 1
|
||||
|
||||
# Prompt the user to check if the device map is correct.
|
||||
echo "Installation finished. No error reported."
|
||||
|
|
|
@ -269,7 +269,8 @@ setup (const char *prefix, const char *dir,
|
|||
struct grub_pc_partition *pcdata =
|
||||
root_dev->disk->partition->data;
|
||||
|
||||
if (strcmp (root_dev->disk->partition->partmap->name, "pc"))
|
||||
if (strcmp (root_dev->disk->partition->partmap->name,
|
||||
"pc_partition_map") != 0)
|
||||
grub_util_error ("No PC style partitions found");
|
||||
|
||||
*install_dos_part
|
||||
|
@ -423,7 +424,8 @@ setup (const char *prefix, const char *dir,
|
|||
struct grub_pc_partition *pcdata =
|
||||
root_dev->disk->partition->data;
|
||||
|
||||
if (strcmp (root_dev->disk->partition->partmap->name, "pc"))
|
||||
if (strcmp (root_dev->disk->partition->partmap->name,
|
||||
"pc_partition_map") != 0)
|
||||
grub_util_error ("No PC style partitions found");
|
||||
|
||||
*install_dos_part
|
||||
|
@ -487,8 +489,8 @@ Usage: grub-setup [OPTION]... DEVICE\n\
|
|||
Set up images to boot from DEVICE.\n\
|
||||
DEVICE must be a GRUB device (e.g. ``(hd0,0)'').\n\
|
||||
\n\
|
||||
-b, --boot-file=FILE use FILE as the boot file [default=%s]\n\
|
||||
-c, --core-file=FILE use FILE as the core file [default=%s]\n\
|
||||
-b, --boot-image=FILE use FILE as the boot image [default=%s]\n\
|
||||
-c, --core-image=FILE use FILE as the core image [default=%s]\n\
|
||||
-d, --directory=DIR use GRUB files in the directory DIR [default=%s]\n\
|
||||
-m, --device-map=FILE use FILE as the device map [default=%s]\n\
|
||||
-r, --root-device=DEV use DEV as the root device [default=guessed]\n\
|
||||
|
@ -655,7 +657,7 @@ main (int argc, char *argv[])
|
|||
grub_util_error ("Cannot guess the root device. Specify the option ``--root-device''.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Do the real work. */
|
||||
setup (prefix,
|
||||
dir ? : DEFAULT_DIRECTORY,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue