kern/141235: commit references a PR

dfilter service dfilter at FreeBSD.ORG
Mon Jun 7 20:40:04 UTC 2010


The following reply was made to PR kern/141235; it has been noted by GNATS.

From: dfilter at FreeBSD.ORG (dfilter service)
To: bug-followup at FreeBSD.org
Cc:  
Subject: Re: kern/141235: commit references a PR
Date: Mon,  7 Jun 2010 20:32:11 +0000 (UTC)

 Author: ae
 Date: Mon Jun  7 20:31:55 2010
 New Revision: 208899
 URL: http://svn.freebsd.org/changeset/base/208899
 
 Log:
   MFC r197608:
   
   The first 96 bytes may not be zeroes. It can contain trivial boot
   code that merely emits an error and waits for a key press before
   rebooting. The error being that extended partitions are not
   bootable. The origin is presumed to be Windows 2000; Windows XP
   does not do this...
   
   For now, ignore the first 96 bytes when checking that the EBR is
   (for the most part) all zeroes.
   
   Tested by:	Mario Lobo <mlobo at digiart.art.br>
   		Dieter <dieterbsd at engineer.com>
   PR:		kern/141235
   Reviewed by:	marcel
   Approved by:	kib (mentor)
   Approved by:	re (bz)
 
 Modified:
   stable/8/sys/geom/part/g_part_ebr.c
 Directory Properties:
   stable/8/sys/   (props changed)
   stable/8/sys/amd64/include/xen/   (props changed)
   stable/8/sys/cddl/contrib/opensolaris/   (props changed)
   stable/8/sys/contrib/dev/acpica/   (props changed)
   stable/8/sys/contrib/pf/   (props changed)
   stable/8/sys/dev/xen/xenpci/   (props changed)
   stable/8/sys/geom/sched/   (props changed)
 
 Modified: stable/8/sys/geom/part/g_part_ebr.c
 ==============================================================================
 --- stable/8/sys/geom/part/g_part_ebr.c	Mon Jun  7 18:47:53 2010	(r208898)
 +++ stable/8/sys/geom/part/g_part_ebr.c	Mon Jun  7 20:31:55 2010	(r208899)
 @@ -410,13 +410,13 @@ g_part_ebr_probe(struct g_part_table *ta
  		goto out;
  
  	/*
 -	 * The sector is all zeroes, except for the partition entries
 -	 * and some signatures or disk serial number. Those can be
 -	 * found in the 9 bytes immediately in front of the partition
 -	 * table.
 +	 * The sector is all zeroes, except for the partition entries,
 +	 * pseudo boot code and some signatures or disk serial number.
 +	 * The latter can be found in the 9 bytes immediately in front
 +	 * of the partition table.
  	 */
  	sum = 0;
 -	for (index = 0; index < DOSPARTOFF - 9; index++)
 +	for (index = 96; index < DOSPARTOFF - 9; index++)
  		sum += buf[index];
  	if (sum != 0)
  		goto out;
 _______________________________________________
 svn-src-all at freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
 


More information about the freebsd-geom mailing list