From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Ltcen-0002O7-PY for mharc-grub-devel@gnu.org; Tue, 14 Apr 2009 03:02:09 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ltcel-0002MY-Jb for grub-devel@gnu.org; Tue, 14 Apr 2009 03:02:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ltcef-0002KY-Eq for grub-devel@gnu.org; Tue, 14 Apr 2009 03:02:06 -0400 Received: from [199.232.76.173] (port=60937 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ltcef-0002KV-9l for grub-devel@gnu.org; Tue, 14 Apr 2009 03:02:01 -0400 Received: from mx20.gnu.org ([199.232.41.8]:25457) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ltcee-0002u9-Cb for grub-devel@gnu.org; Tue, 14 Apr 2009 03:02:00 -0400 Received: from moutng.kundenserver.de ([212.227.126.188]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ltced-0005Ko-8G for grub-devel@gnu.org; Tue, 14 Apr 2009 03:01:59 -0400 Received: from [85.180.9.135] (e180009135.adsl.alicedsl.de [85.180.9.135]) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis) id 0ML2xA-1Ltcea0YHH-0001R4; Tue, 14 Apr 2009 09:01:56 +0200 From: Felix Zielcke To: The development of GRUB 2 In-Reply-To: <20090413191132.GC24072@thorin> References: <1239629520.3747.28.camel@fz.local> <1239632779.3747.32.camel@fz.local> <20090413144902.GB22165@thorin> <1239635464.3747.42.camel@fz.local> <20090413191132.GC24072@thorin> Content-Type: text/plain Date: Tue, 14 Apr 2009 09:01:55 +0200 Message-Id: <1239692515.3718.0.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1/sYYQgyHh4fgDKr9Ho0copITlsPlbXZ/OGcxK NGhTFhEENZJ+0h5ufbz4JiKiekzw9+/DOnLTqCvSvv9ifREmBv +ISEjn8scWqn98nAr8LjXHwU/tCyA1d X-detected-kernel: by mx20.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] fix grub-setup on kfreebsd by adding 0x10 to the sysctl ("kern.geom.debugflags") flags X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2009 07:02:07 -0000 Am Montag, den 13.04.2009, 21:11 +0200 schrieb Robert Millan: > How about [__FreeBSD__ || __FreeBSD_kernel__] ? Ok. > > + if (sysctlbyname ("kern.geom.debugflags", &sysctl_oldflags, &sysctl_size, NULL, 0)) > > + grub_util_error ("cannot get current flags of sysctl kern.geom.debugflags"); > > I'd just return grub_error instead. Otherwise we abort the program even if > failure to read a drive is not critical (e.g. lvm.mod scannning all drives, > grub-emu, etc). Ok. > > + if (! sysctl_oldflags & 0x10 && sysctlbyname ("kern.geom.debugflags", NULL , 0, &sysctl_flags, sysctl_size)) > > + grub_util_error ("cannot set flags of sysctl kern.geom.debugflags"); > > Just a matter of taste, I'd suggest nested ifs to make it more readable. Changed too. I commited this now. -- Felix Zielcke