From: Karel Zak <kzak@redhat.com>
To: Davidlohr Bueso <dave@gnu.org>
Cc: Petr Uzel <petr.uzel@suse.cz>, util-linux <util-linux@vger.kernel.org>
Subject: Re: [PATCH 2/3] fdisk: api: move disklabel type to cxt
Date: Wed, 14 Nov 2012 10:27:02 +0100 [thread overview]
Message-ID: <20121114092702.GA1835@x2.net.home> (raw)
In-Reply-To: <1352880280.2577.4.camel@offbook>
On Wed, Nov 14, 2012 at 12:04:40AM -0800, Davidlohr Bueso wrote:
> - if (disklabel != DOS_LABEL)
> + if (cxt->disklabel != DOS_LABEL)
What about to encapsulate it a little? The final goal is to have
libfdisk, so the context members shouldn't not be directly accessible.
if (fdisk_is_disklabel(cxt, DOS))
something like:
#define fdisk_is_disklabel(c, x) fdisk_dev_is_dislabel(c, FDISK_DISKLABEL_ ## x)
to avoid too generic names (e.g. DOS_LABEL), but keep is brief. Note
that we already have a function fdisk_dev_has_label().
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
prev parent reply other threads:[~2012-11-14 9:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-14 8:04 [PATCH 2/3] fdisk: api: move disklabel type to cxt Davidlohr Bueso
2012-11-14 9:27 ` Karel Zak [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=20121114092702.GA1835@x2.net.home \
--to=kzak@redhat.com \
--cc=dave@gnu.org \
--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 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.