[BusyBox 0001436]: [patch] skip trailing whitespace and comments in /etc/network/interfaces

bugs at busybox.net bugs at busybox.net
Sat Jul 21 16:06:27 UTC 2007


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=1436 
====================================================================== 
Reported By:                mirabilos
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   1436
Category:                   Standards Compliance
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             07-20-2007 05:09 PDT
Last Modified:              07-21-2007 09:06 PDT
====================================================================== 
Summary:                    [patch] skip trailing whitespace and comments in
/etc/network/interfaces
Description: 
I wrote this diff to make the parsing of /etc/network/interfaces
some less surprising to the normal user.

====================================================================== 

---------------------------------------------------------------------- 
 vda - 07-21-07 07:34  
---------------------------------------------------------------------- 
Scary. Will this work too?

while (c = *p) {
    if (c == '#') { *p = '\0'; break; }
    if (c == '"' || c == '\'') {
        while (1) {
            c2 = *++p;
            if (!c2) goto break2;
            if (c2 == c) break;
            if (c2 == '\\' && *p) p++;
        }
    }
    p++;
}
break2: 

---------------------------------------------------------------------- 
 mirabilos - 07-21-07 09:06  
---------------------------------------------------------------------- 
I don't think so, because the different kinds of quoting
require different handling. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-20-07 05:09  mirabilos      New Issue                                    
07-20-07 05:09  mirabilos      Status                   new => assigned     
07-20-07 05:09  mirabilos      Assigned To               => BusyBox         
07-20-07 05:09  mirabilos      File Added: 970-ifupdown-whitespace.patch        
           
07-21-07 07:34  vda            Note Added: 0002614                          
07-21-07 09:06  mirabilos      Note Added: 0002621                          
======================================================================




More information about the busybox-cvs mailing list