NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-macppc/53727: boot floppy doesn't work for openfirmware version1 machines?



The following reply was made to PR port-macppc/53727; it has been noted by GNATS.

From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
To: scole_mail%gmx.com@localhost
Cc: gnats-bugs%NetBSD.org@localhost, tsutsui%ceres.dti.ne.jp@localhost
Subject: Re: port-macppc/53727: boot floppy doesn't work for openfirmware version1
	 machines?
Date: Thu, 15 Nov 2018 01:26:34 +0900

 >   Maybe we should rather check ustarfs, or just skip label checks
 >   on floppies?
 
 This patch seems working (not tested on harddisks though):
 
 Index: ofdev.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/macppc/stand/ofwboot/ofdev.c,v
 retrieving revision 1.26
 diff -u -p -d -r1.26 ofdev.c
 --- ofdev.c	19 Feb 2012 12:02:55 -0000	1.26
 +++ ofdev.c	14 Nov 2018 16:23:20 -0000
 @@ -437,10 +437,11 @@ devopen(struct open_file *of, const char
  		ofdev.type = OFDEV_DISK;
  		ofdev.bsize = DEV_BSIZE;
  		/* First try to find a disklabel without partitions */
 -		if (strategy(&ofdev, F_READ,
 +		if (!floppyboot &&
 +		    (strategy(&ofdev, F_READ,
  			     LABELSECTOR, DEV_BSIZE, buf, &nread) != 0
  		    || nread != DEV_BSIZE
 -		    || getdisklabel(buf, &label)) {
 +		    || getdisklabel(buf, &label))) {
  			/* Else try APM or MBR partitions */
  			struct drvr_map *map = (struct drvr_map *)buf;
  
 


Home | Main Index | Thread Index | Old Index