[lvm-devel] [PATCH 4/5] lvm2app: Move core lv re-size code (v2)

Tony Asleson tasleson at redhat.com
Thu Mar 14 15:29:39 UTC 2013


On 03/14/2013 10:14 AM, Zdenek Kabelac wrote:
> Dne 14.3.2013 16:12, Tony Asleson napsal(a):
>> On 03/14/2013 09:12 AM, Zdenek Kabelac wrote:
>>> Dne 13.3.2013 23:13, Tony Asleson napsal(a):
>>>> Moved to allow use from command line and for library use.
>>>>
>>>> Signed-off-by: Tony Asleson <tasleson at redhat.com>
>>>> ---
>>>>    lib/metadata/lv_manip.c          | 734
>>>> +++++++++++++++++++++++++++++++++++++
>>>>    lib/metadata/metadata-exported.h |  46 +++
>>>>    tools/lvresize.c                 | 771
>>>> ---------------------------------------
>>>>    3 files changed, 780 insertions(+), 771 deletions(-)
>>>>
>>>> diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
>>>> index ad8160e..5baa9b3 100644
>>>> --- a/lib/metadata/lv_manip.c
>>>> +++ b/lib/metadata/lv_manip.c
>>>> +    }
>>>> +
>>>> +    *stripesize = 0;
>>>> +    return 0;
>>>> +}
>>>> +
>>>> +int _lvresize(struct cmd_context *cmd, struct volume_group *vg,
>>>> +             struct lvresize_params *lp, struct dm_list *pvh)
>>>> +{
>>>
>>> Non-internal -> remove '_' ->  ???_lvresize
>>>
>>> we should probably introduce some tool prefix to make it recognizable

What should I use as a prefix for an internal use, non file local static
function?

-Tony

>>
>> It is my intention that this function be internal use only.  The command
>> line entry point is lvresize and the liblvm entry point is
>> lvm_lv_resize, both of which call _lvmresize to do the actual operation.
>>   Or perhaps I'm missing something else?
> 
> Yep - lvm is using '_' for file-local static functions.
> So external functions goes without underscore.
> 
> Zdenek
> 




More information about the lvm-devel mailing list