diff --git a/ChangeLog b/ChangeLog index 7c4864d79..a48fa375d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2001-10-13 Yoshinori K. Okuji + + From Jason Thomas : + * util/grub-install.in (convert): Add support for DAC960. + + From Adrian Phillips : + * lib/device.c (get_dac960_disk_name): New function. + (init_device_map) [__linux__]: Add support for DAC960. + 2001-10-11 Jochen Hoenicke * stage2/fsys_reiserfs.c (reiserfs_super_block): Updated diff --git a/THANKS b/THANKS index c6e1fc02d..237c2bc48 100644 --- a/THANKS +++ b/THANKS @@ -6,6 +6,7 @@ The following people made especially gracious contributions of their time and energy in helping to track down bugs, add new features, and generally assist in the GRUB maintainership process: +Adrian Phillips Alessandro Rubini Alexander K. Hudek Andrew Clausen diff --git a/docs/grub-install.8 b/docs/grub-install.8 index a5fbc8387..947ae3785 100644 --- a/docs/grub-install.8 +++ b/docs/grub-install.8 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23. -.TH GRUB-INSTALL "8" "August 2001" "grub-install (GNU GRUB 0.90)" FSF +.TH GRUB-INSTALL "8" "October 2001" "grub-install (GNU GRUB 0.90)" FSF .SH NAME grub-install \- install GRUB on your drive .SH SYNOPSIS diff --git a/docs/grub-md5-crypt.8 b/docs/grub-md5-crypt.8 index b6ee12e06..22ba0bfcd 100644 --- a/docs/grub-md5-crypt.8 +++ b/docs/grub-md5-crypt.8 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23. -.TH GRUB-MD5-CRYPT "8" "August 2001" "grub-md5-crypt (GNU GRUB )" FSF +.TH GRUB-MD5-CRYPT "8" "October 2001" "grub-md5-crypt (GNU GRUB )" FSF .SH NAME grub-md5-crypt \- Encrypt a password in MD5 format .SH SYNOPSIS diff --git a/docs/grub.8 b/docs/grub.8 index d81f230a8..7b967246a 100644 --- a/docs/grub.8 +++ b/docs/grub.8 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23. -.TH GRUB "8" "August 2001" "grub (GNU GRUB 0.90)" FSF +.TH GRUB "8" "October 2001" "grub (GNU GRUB 0.90)" FSF .SH NAME grub \- the grub shell .SH SYNOPSIS diff --git a/docs/mbchk.1 b/docs/mbchk.1 index 6abc19514..89afb67c2 100644 --- a/docs/mbchk.1 +++ b/docs/mbchk.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23. -.TH MBCHK "1" "August 2001" "mbchk (GNU GRUB 0.90)" FSF +.TH MBCHK "1" "October 2001" "mbchk (GNU GRUB 0.90)" FSF .SH NAME mbchk \- check the format of a Multiboot kernel .SH SYNOPSIS diff --git a/lib/device.c b/lib/device.c index 91051d29e..017a4e077 100644 --- a/lib/device.c +++ b/lib/device.c @@ -1,7 +1,7 @@ /* device.c - Some helper functions for OS devices and BIOS drives */ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 1999, 2000 Free Software Foundation, Inc. + * Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -267,6 +267,14 @@ get_scsi_disk_name (char *name, int unit) #endif } +#ifdef __linux__ +static void +get_dac960_disk_name (char *name, int controller, int drive) +{ + sprintf (name, "/dev/rd/c%dd%d", controller, drive); +} +#endif + /* Check if DEVICE can be read. If an error occurs, return zero, otherwise return non-zero. */ int @@ -577,6 +585,38 @@ init_device_map (char ***map, const char *map_file, int floppy_disks) } } +#ifdef __linux__ + /* This is for DAC960 - we have + /dev/rd/cdp. + + DAC960 driver currently supports up to 8 controllers, 32 logical + drives, and 7 partitions. */ + { + int controller, drive; + + for (controller = 0; controller < 8; controller++) + { + for (drive = 0; drive < 15; drive++) + { + char name[24]; + + get_dac960_disk_name (name, controller, drive); + if (check_device (name)) + { + (*map)[num_hd + 0x80] = strdup (name); + assert ((*map)[num_hd + 0x80]); + + /* If the device map file is opened, write the map. */ + if (fp) + fprintf (fp, "(hd%d)\t%s\n", num_hd, name); + + num_hd++; + } + } + } + } +#endif /* __linux__ */ + /* OK, close the device map file if opened. */ if (fp) fclose (fp); diff --git a/util/grub-install.in b/util/grub-install.in index 3b58f09ec..ab58cc25f 100644 --- a/util/grub-install.in +++ b/util/grub-install.in @@ -78,11 +78,13 @@ convert () { linux*) tmp_disk=`echo "$1" | sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%' \ -e 's%\(fd[0-9]*\)$%\1%' \ - -e 's%/part[0-9]*$%/disc%'` + -e 's%/part[0-9]*$%/disc%' \ + -e 's%\(c[0-7]d[0-9]*\).*$%\1%'` tmp_part=`echo "$1" | sed -e 's%.*/[sh]d[a-z]\([0-9]*\)$%\1%' \ -e 's%.*/fd[0-9]*$%%' \ -e 's%.*/floppy/[0-9]*$%%' \ - -e 's%.*/\(disc\|part\([0-9]*\)\)$%\2%'` + -e 's%.*/\(disc\|part\([0-9]*\)\)$%\2%' \ + -e 's%.*c[0-7]d[0-9]*p*%%'` ;; gnu*) tmp_disk=`echo "$1" | sed 's%\([sh]d[0-9]*\).*%\1%'`