[lvm-devel] [PATCH 02/14] Refactor and add code for (lv) 'lv_path' get function.

Petr Rockai prockai at redhat.com
Tue Oct 12 15:52:22 UTC 2010


Dave Wysochanski <dwysocha at redhat.com> writes:

>> Should the above dm_pool_zalloc/dm_snprintf go into some
>> dm_pool_asprintf, in fact? That would also remove that "len"
>> computation and make this function completely trivial. We already
>> have dm_asprintf (which uses dm_malloc). You could probably
>> parametrise dm_asprintf with the strdup function into
>> dm_generic_asprintf and have both dm_asprintf and dm_pool_asprintf
>> implemented in terms of that.

> If it's ok with you, I may defer these to a couple cleanup patches.
> They are good suggestions but I'm mostly focused on straight moving
> and refactoring for this patch set.

Sure, no problem. That can be done later. The patch is, logic-wise, in
order, as far as I can tell. The suggestions are quite optional, and of
course there's always a tradeoff. Ok to check in, I'll look at factoring
in dm_pool_asprintf later.

Yours,
   Petr.




More information about the lvm-devel mailing list