Subject: Re: port-i386/31503
To: None <port-i386-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: Wolfgang Stukenbrock <Wolfgang.Stukenbrock@nagler-company.com>
List: netbsd-bugs
Date: 10/17/2005 12:17:01
The following reply was made to PR port-i386/31503; it has been noted by GNATS.
From: Wolfgang Stukenbrock <Wolfgang.Stukenbrock@nagler-company.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: port-i386/31503
Date: Mon, 17 Oct 2005 14:13:49 +0200
Hi again,
my previous fix will brak the "-S" option for scripts if the WARNING
messages is printed.
Therefore the WARNING message may not be printed on stdout, it must go
to stderr.
So the fix must look like the following.
Sorry
W. Stukenbrock.
RCS file: RCS/fdisk.c,v
retrieving revision 1.1
diff -c -r1.1 fdisk.c
*** fdisk.c 2005/10/07 08:55:35 1.1
--- fdisk.c 2005/10/07 09:11:37
***************
*** 1034,1040 ****
* just use them, we don't need to know which disk is which.
*/
if (nip->ni_nmatches != 0) {
!
bip = &dl->dl_biosdisks[nip->ni_biosmatches[0]];
dos_cylinders = bip->bi_cyl;
dos_heads = bip->bi_head;
dos_sectors = bip->bi_sec;
--- 1034,1054 ----
* just use them, we don't need to know which disk is which.
*/
if (nip->ni_nmatches != 0) {
! /* need to determine the correct index to use.
! * there is a feature if we have empty disks, that all empty disk are
placed in the same
! * biosmatches group by the kernel.
! * As a workaround we search for the correct number of blocks in the
list an take that entry
! */
!
for (i = 0; i < nip->ni_nmatches; i++)
!
{
!
bip = &dl->dl_biosdisks[nip->ni_biosmatches[i]];
!
if (disksectors == bip->bi_lbasecs) break;
!
}
!
if (i == nip->ni_nmatches)
!
{
!
bip = &dl->dl_biosdisks[nip->ni_biosmatches[0]];
!
fprintf(stderr, "WARNING: no matching number of disksectors (%llu)
found\n reverting to old style and take first entry (%llu
sectors)\n", disksectors, bip->bi_lbasecs);
!
}
dos_cylinders = bip->bi_cyl;
dos_heads = bip->bi_head;
dos_sectors = bip->bi_sec;