From: Petr Uzel <petr.uzel@suse.cz>
To: Davidlohr Bueso <dave@gnu.org>
Cc: Bernhard Voelker <mail@bernhard-voelker.de>,
util-linux <util-linux@vger.kernel.org>
Subject: Re: [PATCH 03/10] fdisk: API: add fdisk_label_change
Date: Tue, 24 Jul 2012 12:42:49 +0200 [thread overview]
Message-ID: <20120724104249.GF2086@foxbat.suse.cz> (raw)
In-Reply-To: <1343126347.2686.4.camel@offbook>
[-- Attachment #1: Type: text/plain, Size: 922 bytes --]
On Tue, Jul 24, 2012 at 12:39:07PM +0200, Davidlohr Bueso wrote:
> > >> Shouldn't we use something else than hardcoded "sun"|"dos"|"sgi"|...
> > >> strings here?
> > >
> > > What's the problem with these strings? I think these are well
> > > recognized with clear meaning. What alternative do you propose?
> >
> > Sorry, I should've proposed this already in my first mail:
> >
> > - fdisk_label_change(cxt, "sun");
> > + fdisk_label_change(cxt, sun_label.name);
Ah, right. Deduplicating the strings makes sense, IMO.
> I'm planning on adding the disklabel type (numeric) to the context
> structure in a near future, so we'd then have two ways of identifying
> labels. I really do not see much difference between numbers and strings
> - this is not a performance critical program.
The concern here is not speed, but maintainability ;)
Best,
Petr
--
Petr Uzel
IRC: ptr_uzl @ freenode
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2012-07-24 10:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-22 17:05 [PATCH 03/10] fdisk: API: add fdisk_label_change Davidlohr Bueso
2012-07-24 9:47 ` Bernhard Voelker
2012-07-24 9:56 ` Petr Uzel
2012-07-24 10:32 ` Bernhard Voelker
2012-07-24 10:39 ` Davidlohr Bueso
2012-07-24 10:42 ` Petr Uzel [this message]
2012-07-24 10:47 ` Bernhard Voelker
2012-07-24 9:52 ` Petr Uzel
2012-07-24 10:41 ` Davidlohr Bueso
2012-07-24 10:52 ` Petr Uzel
2012-07-24 11:35 ` 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=20120724104249.GF2086@foxbat.suse.cz \
--to=petr.uzel@suse.cz \
--cc=dave@gnu.org \
--cc=mail@bernhard-voelker.de \
--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;
as well as URLs for NNTP newsgroup(s).