On 07/24/2012 12:42 PM, Petr Uzel wrote: > 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 ;) Right ... and to save a bit size of the binary (well, not too much in this case) ;-) Have a nice day, Berny -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html