BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001436 [BusyBox] Standards Compliance minor always 07-20-07 05:09 02-18-08 13:13
Reporter mirabilos View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version 1.4.x
Summary 0001436: [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.
Additional Information
Attached Files  970-ifupdown-whitespace.patch [^] (1,338 bytes) 07-20-07 05:09

- Relationships

- Notes
(0002614)
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:
 
(0002621)
mirabilos
07-21-07 09:06

I don't think so, because the different kinds of quoting
require different handling.
 
(0002624)
vda
07-21-07 16:19

Can we PLEASE discuss patches on the mailing list?

What are quoting rules for /etc/network/interfaces?
 
(0002628)
mirabilos
07-23-07 03:02

About formal rules: I think you'd have to ask the Debian people,
or whoever defined the file format for /etc/network/interfaces.
I don't know, I'm just guessing, and from a shell programmer's
point of view, single quotes and double quotes behave quite dif-
ferently.

If it's just the goto that offends you, I can rewrite the code
to not use one. But you need some kind of state machine here.

About the mailing list: feel free to make up a thread and Cc:
me, I'm not subscribed to any mailing list here.
 
(0005094)
vda
02-18-08 13:13

I believe current svn's handling is correct:

# _in first position only_ starts a comment,
empty lines are ignored,
'\' in last position concatenates lines (needs CONFIG_DESKTOP)

This should be compatible with "standard" tools.
 

- 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
07-21-07 16:19 vda Note Added: 0002624
07-23-07 03:02 mirabilos Note Added: 0002628
02-18-08 13:13 vda Status assigned => closed
02-18-08 13:13 vda Note Added: 0005094
02-18-08 13:13 vda Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker