diff --git a/ChangeLog b/ChangeLog index 960037605..0501fbdab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2003-02-17 Yoshinori K. Okuji + + * 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 : + * 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 From Ilguiz Latypov: diff --git a/NEWS b/NEWS index dd778865b..75fe3a85d 100644 --- 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 7142335c9..550eb14c5 100644 --- a/THANKS +++ b/THANKS @@ -91,6 +91,7 @@ Stefan Ondrejicka Stephen Early Steven Dick Takehiro Suzuki +Taketo Kabe Thierry DELHAISE Thierry Laronde Thomas Schweikle diff --git a/docs/grub.8 b/docs/grub.8 index f601c90e8..52665e53c 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" "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 diff --git a/docs/mbchk.1 b/docs/mbchk.1 index 0c921a1ec..af8f1166d 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" "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 diff --git a/lib/device.c b/lib/device.c index 72903c9eb..a88a2db90 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,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) { diff --git a/stage2/mb_info.h b/stage2/mb_info.h index fb37f10ff..1e1e63bae 100644 --- a/stage2/mb_info.h +++ b/stage2/mb_info.h @@ -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 diff --git a/stage2/shared.h b/stage2/shared.h index 14c134adc..5f3c3a94a 100644 --- a/stage2/shared.h +++ b/stage2/shared.h @@ -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