]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2003-02-17 Yoshinori K. Okuji <okuji@enbug.org>
authorokuji <okuji@localhost>
Mon, 17 Feb 2003 12:35:30 +0000 (12:35 +0000)
committerokuji <okuji@localhost>
Mon, 17 Feb 2003 12:35:30 +0000 (12:35 +0000)
* lib/device.c (check_device): If DEVICE is empty, just return
1.
(get_scsi_disk_name) [__QNXNTO__]: Make NAME empty, because SCSI
disks are detected as IDE disks on QNX RTP.

From Taketo Kabe <kabe@sra-tohoku.co.jp>:
* lib/device.c (get_ide_disk_name) [__QNXNTO__]: Set NAME to
"/dev/hdX".
(get_floppy_disk_name) [__QNXNTO__]: Set NAME to "/dev/fdX".
* stage2/mb_info.h (struct AddrRangeDesc): Specified with the
attribute packed.
* stage2/shared.h (struct mmar_desc): Likewise.

ChangeLog
NEWS
THANKS
docs/grub.8
docs/mbchk.1
lib/device.c
stage2/mb_info.h
stage2/shared.h

index 96003760505baeef1d8a65579a286359a95f2c8d..0501fbdab5229f3d1732a64a4696714da92ab9aa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2003-02-17  Yoshinori K. Okuji  <okuji@enbug.org>
+
+       * lib/device.c (check_device): If DEVICE is empty, just return
+       1.
+       (get_scsi_disk_name) [__QNXNTO__]: Make NAME empty, because SCSI
+       disks are detected as IDE disks on QNX RTP.
+
+       From Taketo Kabe <kabe@sra-tohoku.co.jp>:
+       * lib/device.c (get_ide_disk_name) [__QNXNTO__]: Set NAME to
+       "/dev/hdX".
+       (get_floppy_disk_name) [__QNXNTO__]: Set NAME to "/dev/fdX".
+       * stage2/mb_info.h (struct AddrRangeDesc): Specified with the
+       attribute packed.
+       * stage2/shared.h (struct mmar_desc): Likewise.
+
 2003-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
 
        From Ilguiz Latypov:
diff --git a/NEWS b/NEWS
index dd778865be0f27e59276c594fa5b477ddc68d5a9..75fe3a85dec76eefdd7f3040568ecd9c5ef5ba04 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ New:
 * Add a workaround for buggy BIOSes (notably HP Vectra series) which
   don't pass the boot drive correctly.
 * Display "GNU GRUB" instead of "GRUB" in the menu.
+* Add support QNX RTP into the grub shell.
 
 New in 0.93 - 2002-12-08:
 * Define the behavior of the boot loader when the load end address is
diff --git a/THANKS b/THANKS
index 7142335c9138486e538a0f3b70d5e806d78a8835..550eb14c5122f185d66b8d8e425c35beaf10a41a 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -91,6 +91,7 @@ Stefan Ondrejicka <ondrej@idata.sk>
 Stephen Early <steve@greenend.org.uk>
 Steven Dick <ssd.gnu@mmae.ucf.edu>
 Takehiro Suzuki <takehiro@coral.ocn.ne.jp>
+Taketo Kabe <kabe@sra-tohoku.co.jp>
 Thierry DELHAISE <thierry.delhaise@delhaise.com>
 Thierry Laronde <thierry.laronde@polynum.com>
 Thomas Schweikle <tschweikle@fiducia.de>
index f601c90e8f9b2fbef4e3b63c228610f1d6618a41..52665e53cdc13cd02a498f4b32e87998fbae352a 100644 (file)
@@ -1,5 +1,5 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.23.
-.TH GRUB "8" "January 2003" "grub (GNU GRUB 0.93)" FSF
+.TH GRUB "8" "February 2003" "grub (GNU GRUB 0.93)" FSF
 .SH NAME
 grub \- the grub shell
 .SH SYNOPSIS
index 0c921a1ec7c9a39d00c67cd54ac50af33569851a..af8f1166d92508583d00e658404ca8d0efb00314 100644 (file)
@@ -1,5 +1,5 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.23.
-.TH MBCHK "1" "January 2003" "mbchk (GNU GRUB 0.93)" FSF
+.TH MBCHK "1" "February 2003" "mbchk (GNU GRUB 0.93)" FSF
 .SH NAME
 mbchk \- check the format of a Multiboot kernel
 .SH SYNOPSIS
index 72903c9eb8c036d05d4069fba988c5958ad603d4..a88a2db908047ffb07b923c3d44ebeb8b84f9b0a 100644 (file)
@@ -1,7 +1,7 @@
 /* device.c - Some helper functions for OS devices and BIOS drives */
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 1999,2000,2001,2002  Free Software Foundation, Inc.
+ *  Copyright (C) 1999,2000,2001,2002,2003  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
@@ -208,6 +208,9 @@ get_floppy_disk_name (char *name, int unit)
 #elif defined(__OpenBSD__)
   /* OpenBSD */
   sprintf (name, "/dev/rfd%dc", unit);
+#elif defined(__QNXNTO__)
+  /* QNX RTP */
+  sprintf (name, "/dev/fd%d", unit);
 #else
 # warning "BIOS floppy drives cannot be guessed in your operating system."
   /* Set NAME to a bogus string.  */
@@ -245,6 +248,11 @@ get_ide_disk_name (char *name, int unit)
 #elif defined(__OpenBSD__)
   /* OpenBSD */
   sprintf (name, "/dev/rwd%dc", unit);
+#elif defined(__QNXNTO__)
+  /* QNX RTP */
+  /* Actually, QNX RTP doesn't distinguish IDE from SCSI, so this could
+     contain SCSI disks.  */
+  sprintf (name, "/dev/hd%d", unit);
 #else
 # warning "BIOS IDE drives cannot be guessed in your operating system."
   /* Set NAME to a bogus string.  */
@@ -278,6 +286,11 @@ get_scsi_disk_name (char *name, int unit)
 #elif defined(__OpenBSD__)
   /* OpenBSD */
   sprintf (name, "/dev/rsd%dc", unit);
+#elif defined(__QNXNTO__)
+  /* QNX RTP */
+  /* QNX RTP doesn't distinguish SCSI from IDE, so it is better to
+     disable the detection of SCSI disks here.  */
+  *name = 0;
 #else
 # warning "BIOS SCSI drives cannot be guessed in your operating system."
   /* Set NAME to a bogus string.  */
@@ -301,6 +314,10 @@ check_device (const char *device)
   char buf[512];
   FILE *fp;
 
+  /* If DEVICE is empty, just return 1.  */
+  if (*device == 0)
+    return 1;
+  
   fp = fopen (device, "r");
   if (! fp)
     {
index fb37f10ff09c77c8def07adb3a8c815b5c299bde..1e1e63bae6023d99339c9f869ee9b9ee2ef7ab7b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2000  Free Software Foundation, Inc.
+ *  Copyright (C) 2000,2003  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
@@ -50,7 +50,7 @@ struct AddrRangeDesc
   unsigned long Type;
   
   /* unspecified optional padding... */
-};
+} __attribute__ ((packed));
 
 /* usable memory "Type", all others are reserved.  */
 #define MB_ARD_MEMORY          1
index 14c134adc29669645418aaab74e8f0a40566d27d..5f3c3a94a5d87c76486f54766acc644532bf8fba 100644 (file)
@@ -1,7 +1,7 @@
 /* shared.h - definitions used in all GRUB-specific code */
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 1999,2000,2001,2002  Free Software Foundation, Inc.
+ *  Copyright (C) 1999,2000,2001,2002,2003  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
@@ -412,7 +412,7 @@ struct mmar_desc
   unsigned long long addr;     /* Base address. */
   unsigned long long length;   /* Length in bytes. */
   unsigned long type;          /* Type of address range. */
-};
+} __attribute__ ((packed));
 
 /* VBE controller information.  */
 struct vbe_controller