Re: [Patch 2/10] NFS Mount Configuration File (Vers 3)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 08/07/2009 04:07 AM, Benny Halevy wrote:
> On Aug. 06, 2009, 21:41 +0300, Steve Dickson <SteveD@xxxxxxxxxx> wrote:
>> commit f6f4d0b872c01eaffbcb4c3919f13237aa8678e1
>> Author: Steve Dickson <steved@xxxxxxxxxx>
>> Date:   Mon Mar 9 13:55:25 2009 -0400
>>
>>     Taught conf_parse_line() to ignore spaces in the
>>      '[section]' parsing and before the assignment statements
>>     
>>     Signed-off-by: Steve Dickson <steved@xxxxxxxxxx>
>>
>> diff --git a/support/nfs/conffile.c b/support/nfs/conffile.c
>> index c5f9fa7..5f491eb 100644
>> --- a/support/nfs/conffile.c
>> +++ b/support/nfs/conffile.c
>> @@ -50,11 +50,6 @@
>>  #include "xlog.h"
>>  
>>  static void conf_load_defaults (int);
>> -#if 0
>> -static int conf_find_trans_xf (int, char *);
>> -#endif
>> -
>> -size_t  strlcpy(char *, const char *, size_t);
>>  
>>  struct conf_trans {
>>  	TAILQ_ENTRY (conf_trans) link;
>> @@ -219,26 +214,48 @@ conf_parse_line(int trans, char *line, size_t sz)
>>  	if (*line == '#' || *line == ';')
>>  		return;
>>  
>> +	/* Ignore blank lines */
>> +	if (*line == '\0')
>> +		return;
>> +
>> +	/* Strip off any leading blanks */
>> +	while (isblank(*line)) 
>> +		line++;
>> +
> 
> Why not do this before looking for '#' or ';'?
Point, if we supported in-line comments or am I missing 
something? 

steved.

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux