From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] biosdisk, getroot for Cygwin
Date: Mon, 12 May 2008 17:25:27 +0200 [thread overview]
Message-ID: <20080512152527.GA1841@thorin> (raw)
In-Reply-To: <48248ABA.5010704@t-online.de>
On Fri, May 09, 2008 at 07:32:42PM +0200, Christian Franke wrote:
> >>+ char devpath[sizeof ("/dev/sda15") + 13];
> >>
> >
> >Where does this 13 come from? Would be nice to make it explicit (e.g.
> >sizeof(something) or so).
>
> 13 "paranoia" bytes added to the required size :-)
A comment saying that would be nice.
On Sun, May 11, 2008 at 11:04:39PM +0200, Christian Franke wrote:
>
> Probably more readable and extensible - Use early returns:
Yeah I like that better too.
> #ifndef __CYGWIN__
> /* This might be truly slow, but is there any better way? */
> os_dev = find_root_device ("/dev", st.st_dev);
>
> #else /* __CYGWIN__ */
> /* Cygwin specific function. */
> os_dev = find_cygwin_root_device (dir, st.st_dev);
>
> #endif /* __CYGWIN__ */
I'd suggest removing the double-negation here; it looks more readable
with "#ifdef / #else" IMHO (and is easier to add more OS-specific checks
like "#if defined(__CYGWIN__) / #elif defined(...) / #else".
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)
next prev parent reply other threads:[~2008-05-12 15:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-23 20:30 [PATCH] biosdisk, getroot for Cygwin Christian Franke
2008-05-07 20:42 ` Christian Franke
2008-05-09 12:45 ` Robert Millan
2008-05-09 17:32 ` Christian Franke
2008-05-11 21:04 ` Christian Franke
2008-05-12 15:25 ` Robert Millan [this message]
2008-05-13 21:17 ` Christian Franke
2008-05-16 21:43 ` Christian Franke
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=20080512152527.GA1841@thorin \
--to=rmh@aybabtu.com \
--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.