Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Oct 2011 11:14:58 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Andriy Gapon <avg@FreeBSD.org>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r226554 - head/sys/boot/common
Message-ID:  <20111020091457.GE1722@garage.freebsd.pl>
In-Reply-To: <4E9FC87B.7010903@FreeBSD.org>
References:  <201110192348.p9JNmFvR047883@svn.freebsd.org> <4E9FC87B.7010903@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Thu, Oct 20, 2011 at 10:06:35AM +0300, Andriy Gapon wrote:
> on 20/10/2011 02:48 Pawel Jakub Dawidek said the following:
> > Author: pjd
> > Date: Wed Oct 19 23:48:15 2011
> > New Revision: 226554
> > URL: http://svn.freebsd.org/changeset/base/226554
> > 
> > Log:
> >   Fix missing return when LOADER_GPT_SUPPORT is defined, but LOADER_MBR_SUPPORT
> >   is not.
> >   
> >   MFC after:	3 days
> > 
> > Modified:
> >   head/sys/boot/common/disk.c
> > 
> > Modified: head/sys/boot/common/disk.c
> > ==============================================================================
> > --- head/sys/boot/common/disk.c	Wed Oct 19 23:44:38 2011	(r226553)
> > +++ head/sys/boot/common/disk.c	Wed Oct 19 23:48:15 2011	(r226554)
> > @@ -776,9 +776,9 @@ disk_open(struct disk_devdesc *dev)
> >  
> >  #ifdef LOADER_GPT_SUPPORT
> >  	rc = disk_opengpt(dev);
> > -	if (rc)
> >  #endif
> >  #ifdef LOADER_MBR_SUPPORT
> > +	if (rc)
> >  		rc = disk_openmbr(dev);
> >  #endif
> >  
> 
> I believe that this fix is incorrect.  Now with !LOADER_GPT_SUPPORT and
> LOADER_MBR_SUPPORT the preprocessed code would be:
> 
> 	rc = 0;
> 	/*
> 	 * While we are reading disk metadata, make sure we do it relative
> 	 * to the start of the disk
> 	 */
> 	dev->d_offset = 0;
> 
> 	if (rc)
> 		rc = disk_openmbr(dev);
>
> Please see my take at the problem:
> https://gitorious.org/~avg/freebsd/avgbsd/commit/49adde51339791a7bf0e2c75f24eeda2bc886da5

Yes, you are right. Feel free to commit your fix.

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://yomoli.com

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAk6f5pAACgkQForvXbEpPzQolACeL2ck8y6UKqE255af6xK8xCkH
5o8AoNZU9BdzCpIf0W2pAGhu26U+FaOQ
=4xpt
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111020091457.GE1722>