grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] fix grub-setup on kfreebsd by adding 0x10 to the sysctl ("ke


From: Felix Zielcke
Subject: Re: [PATCH] fix grub-setup on kfreebsd by adding 0x10 to the sysctl ("kern.geom.debugflags") flags
Date: Mon, 13 Apr 2009 17:11:04 +0200

Am Montag, den 13.04.2009, 16:49 +0200 schrieb Robert Millan:

Thanks for reviewing.

> On Mon, Apr 13, 2009 at 04:26:19PM +0200, Felix Zielcke wrote:
> > +#ifdef __FreeBSD_kernel__
> 
> Unfortunately FreeBSD doesn't define __FreeBSD_kernel__, so we need
> to check for both macros.

Oh right.

> > +#if defined __FreeBSD_kernel__
> > +  int sysctl_flags, sysctl_oldflags;
> > +  size_t sysctl_size = sizeof (sysctl_flags);
> 
> You can add a `const' on this one.
> 
> > +  sysctl_flags = sysctl_oldflags |= 0x10;
> 
> Shouldn't this be "sysctl_oldflags | 0x10" ?

Yes.
> Btw you can avoid the two subsequent calls if sysctl_flags == sysctl_oldflags.

Right and actually it can be even avoided if 0x10 is already set.

Is it correct that I used now `[__FreeBSD__]: Likewise.' in the
Changelog?
The GCS unfortunately doestn't tell anything about the case that a
change applies to 2 or more marcros and I couldn't find an example in
the existing Changelog for this.

-- 
Felix Zielcke

Attachment: kfreebsd.patch.2
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]