From smpatel@xi.dorm.umd.edu  Tue Sep 26 21:23:18 1995
Received: from xi.dorm.umd.edu (xi.dorm.umd.edu [129.2.152.45])
          by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id VAA12399
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 26 Sep 1995 21:23:15 -0700
Received: (from smpatel@localhost) by xi.dorm.umd.edu (8.6.11/8.6.9) id AAA00560; Wed, 27 Sep 1995 00:23:06 -0400
Message-Id: <199509270423.AAA00560@xi.dorm.umd.edu>
Date: Wed, 27 Sep 1995 00:23:06 -0400
From: smpatel@wam.umd.edu
Reply-To: smpatel@wam.umd.edu
To: FreeBSD-gnats-submit@freebsd.org
Subject: syslog errors accessing Mac hard disks [patch]
X-Send-Pr-Version: 3.2

>Number:         742
>Category:       kern
>Synopsis:       syslog errors accessing Mac hard disks [patch]
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 26 21:30:01 PDT 1995
>Closed-Date:    Sun Jan 11 07:50:20 PST 2004
>Last-Modified:  Sun Jan 11 07:50:20 PST 2004
>Originator:     Sujal Patel
>Release:        FreeBSD 2.0-BUILT-19950628 i386
>Organization:
>Environment:

	

>Description:

Every access to Mac hard disks causes errors because the partition table is
not valid.  It gets a little ugly after a lot of accesses :)

>How-To-Repeat:

if /dev/sd2 is a Mac disk:
more < /dev/sd2

>Fix:
	
Patch to detect and ignore Mac disks is attached (/usr/src/sys/i386/isa):

--- diskslice_machdep.c.old	Tue Sep 12 04:46:57 1995
+++ diskslice_machdep.c	Tue Sep 26 23:58:32 1995
@@ -208,6 +208,12 @@
 	cp = bp->b_un.b_addr;
 	sname = dsname(dname, dkunit(dev), WHOLE_DISK_SLICE, RAW_PART,
 		       partname);
+        /* Ignore Mac disks */
+	if (cp[0] == 0x45 && cp[1] == 0x52 && 
+	   (cp[0x1FE] != 0x55 || cp[0x1FF] != 0xAA)) {
+		error = EINVAL;
+		goto done;
+	}
 	if (cp[0x1FE] != 0x55 || cp[0x1FF] != 0xAA) {
 		printf("%s: invalid primary partition table: no magic\n",
 		       sname);
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->dyson 
Responsible-Changed-By: scrappy 
Responsible-Changed-When: Sun May 26 23:02:55 PDT 1996 
Responsible-Changed-Why:  
most recent bug fixes...problem report includes a patch 
State-Changed-From-To: open->suspended 
State-Changed-By: phk 
State-Changed-When: Sun Apr 12 11:09:04 PDT 1998 
State-Changed-Why:  
The correct thing to do is to understand mac-disk partitioneing. 
Check with julian@freebsd.org who is working on a generic framework 
where this could fit in nicely. 


Responsible-Changed-From-To: dyson->freebsd-bugs 
Responsible-Changed-By: phk 
Responsible-Changed-When: Sun Apr 12 11:09:04 PDT 1998 
Responsible-Changed-Why:  
-> suspended 

From: "Cox SMTP central" <harry685@cox.net>
To: <freebsd-gnats-submit@FreeBSD.org>, <smpatel@wam.umd.edu>
Cc:  
Subject: Re: kern/742: syslog errors accessing Mac hard disks [patch]
Date: Fri, 5 Jul 2002 14:02:37 -0500

 This is a multi-part message in MIME format.
 
 ------=_NextPart_000_0003_01C2242C.9E9A2BA0
 Content-Type: text/plain;
 	charset="iso-8859-1"
 Content-Transfer-Encoding: quoted-printable
 
 Do the disks work hooked up to a Macintosh?  If they don't, then the =
 error is legit.
 
 ------=_NextPart_000_0003_01C2242C.9E9A2BA0
 Content-Type: text/html;
 	charset="iso-8859-1"
 Content-Transfer-Encoding: quoted-printable
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <HTML><HEAD>
 <META http-equiv=3DContent-Type content=3D"text/html; =
 charset=3Diso-8859-1">
 <META content=3D"MSHTML 6.00.2716.2200" name=3DGENERATOR>
 <STYLE></STYLE>
 </HEAD>
 <BODY bgColor=3D#ffffff>
 <DIV><FONT face=3D"Microsoft Sans Serif" size=3D2>Do the disks work =
 hooked up to a=20
 Macintosh?&nbsp; If they don't, then the error is=20
 legit.</FONT></DIV></BODY></HTML>
 
 ------=_NextPart_000_0003_01C2242C.9E9A2BA0--
 
 
State-Changed-From-To: suspended->closed 
State-Changed-By: iedowse 
State-Changed-When: Sun Jan 11 07:47:56 PST 2004 
State-Changed-Why:  

This is unlikely to be ever fixed in 4.x, and is probably handled 
better in -CURRENT. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=742 
>Unformatted:
