All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Zielcke <fzielcke@z-51.de>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] fix grub-setup on kfreebsd by adding 0x10 to the sysctl ("kern.geom.debugflags") flags
Date: Tue, 14 Apr 2009 09:01:55 +0200	[thread overview]
Message-ID: <1239692515.3718.0.camel@fz.local> (raw)
In-Reply-To: <20090413191132.GC24072@thorin>

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




      reply	other threads:[~2009-04-14  7:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-13 13:32 [PATCH] fix grub-setup on kfreebsd by adding 0x10 to the sysctl ("kern.geom.debugflags") flags Felix Zielcke
2009-04-13 14:26 ` Felix Zielcke
2009-04-13 14:49   ` Robert Millan
2009-04-13 15:11     ` Felix Zielcke
2009-04-13 19:11       ` Robert Millan
2009-04-14  7:01         ` Felix Zielcke [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1239692515.3718.0.camel@fz.local \
    --to=fzielcke@z-51.de \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.