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: scole_mail <scole_mail%gmx.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: tsutsui%ceres.dti.ne.jp@localhost
Subject: Re: port-macppc/53727: boot floppy doesn't work for openfirmware version1 machines?
Date: Wed, 14 Nov 2018 08:39:13 -0800
Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost> writes:
>> 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;
>
Yes, that seems like a better way to go. I don't have a working hard
disk to check with either. Do you want to commit it?
Thanks
Home |
Main Index |
Thread Index |
Old Index