From: Davidlohr Bueso <dave@gnu.org>
To: Karel Zak <kzak@redhat.com>
Cc: Petr Uzel <petr.uzel@suse.cz>, util-linux <util-linux@vger.kernel.org>
Subject: Re: [PATCH 2/2] fdisk: API: comment labels array
Date: Tue, 24 Jul 2012 14:57:17 +0200 [thread overview]
Message-ID: <1343134637.2686.19.camel@offbook> (raw)
In-Reply-To: <20120724124945.GM736@x2.net.home>
On Tue, 2012-07-24 at 14:49 +0200, Karel Zak wrote:
> On Tue, Jul 24, 2012 at 02:40:30PM +0200, Davidlohr Bueso wrote:
> > From: Davidlohr Bueso <dave@gnu.org>
> >
> > Signed-off-by: Davidlohr Bueso <dave@gnu.org>
> > ---
> > fdisks/utils.c | 4 +++-
> > 1 files changed, 3 insertions(+), 1 deletions(-)
> >
> > diff --git a/fdisks/utils.c b/fdisks/utils.c
> > index 8de64c2..c4ffe04 100644
> > --- a/fdisks/utils.c
> > +++ b/fdisks/utils.c
> > @@ -35,7 +35,9 @@
> > int fdisk_debug_mask;
> >
> > /*
> > - * label probing functions
> > + * Label probing functions.
> > + * Must have the same order as fdisk_labeltype as the index
> > + * depends on it.
>
> This (rely on comment) is bad way.
>
> > */
> > static const struct fdisk_label *labels[] =
> > {
>
> Use:
>
> static const struct fdisk_label[] =
> {
> [XXX_LABEL] = &xxx_label,
> [YYY_LABEL] = &yyy_label
> }
>
Yes, this is how we normally do it, but since we have an offset of 1 to
the index, it looks weired. I guess we need to straighten out
fdisk_labeltype and fix the menu along with it.
> Karel
>
next prev parent reply other threads:[~2012-07-24 12:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-24 12:40 [PATCH 2/2] fdisk: API: comment labels array Davidlohr Bueso
2012-07-24 12:49 ` Karel Zak
2012-07-24 12:57 ` Davidlohr Bueso [this message]
2012-07-24 14:18 ` Karel Zak
2012-07-26 9:13 ` Karel Zak
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=1343134637.2686.19.camel@offbook \
--to=dave@gnu.org \
--cc=kzak@redhat.com \
--cc=petr.uzel@suse.cz \
--cc=util-linux@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox