[Ocfs2-tools-devel] [PATCH 11/25] o2cb: Add ops add-node and remove-node

Sunil Mushran sunil.mushran at oracle.com
Mon Jun 28 11:18:14 PDT 2010


On 06/28/2010 11:12 AM, Joel Becker wrote:
> On Sun, Jun 27, 2010 at 10:33:10AM -0700, Sunil Mushran wrote:
>    
>> On 06/23/2010 07:33 PM, Joel Becker wrote:
>>      
>>>> +	clustername = cmd->o_argv[1];
>>>> +	nodename = cmd->o_argv[2];
>>>> +
>>>> +	cluster = o2cb_config_get_cluster_by_name(cmd->o_config, clustername);
>>>>          
>>> 	Do you need to check for zero-length arguments, or do the
>>> underlying calls find that out?
>>>        
>> The parse function should ensure the arg is not zero length. Or, am
>> I missing something.
>>      
> 	I don't see anywhere in your parse function that checks the
> length of clustername or nodename.  Do you mean the normal shell
> argument processing before your main() is invoked?  Try running 'cat
> ""'.  You'll see that a zero-length argument is indeed passed.
>    

ok. I'll fix that to ensure no zero-length clustername.




More information about the Ocfs2-tools-devel mailing list