diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-08 03:25:25 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-08 03:25:25 +0000 |
commit | 493829207c1c2a36d55aaa13abf806533d0cb87f (patch) | |
tree | 5881b8454284b35ccd31cc0620178a4eff3f52d2 | |
parent | 5d62462a8c7d911fae7d4711be21faf8b8973a09 (diff) | |
download | busybox-w32-493829207c1c2a36d55aaa13abf806533d0cb87f.tar.gz busybox-w32-493829207c1c2a36d55aaa13abf806533d0cb87f.tar.bz2 busybox-w32-493829207c1c2a36d55aaa13abf806533d0cb87f.zip |
ifupdown: /etc/network/interfaces can have comments with leading blanks
-rw-r--r-- | networking/ifupdown.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c index af7bb6e17..2b5e8a14e 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c | |||
@@ -675,7 +675,7 @@ static struct interfaces_file_t *read_interfaces(const char *filename) | |||
675 | * the last character a backslash. | 675 | * the last character a backslash. |
676 | * | 676 | * |
677 | * Seen elsewhere in example config file: | 677 | * Seen elsewhere in example config file: |
678 | * A "#" character in the very first column makes the rest of the line | 678 | * A first non-blank "#" character makes the rest of the line |
679 | * be ignored. Blank lines are ignored. Lines may be indented freely. | 679 | * be ignored. Blank lines are ignored. Lines may be indented freely. |
680 | * A "\" character at the very end of the line indicates the next line | 680 | * A "\" character at the very end of the line indicates the next line |
681 | * should be treated as a continuation of the current one. | 681 | * should be treated as a continuation of the current one. |
@@ -711,7 +711,7 @@ static struct interfaces_file_t *read_interfaces(const char *filename) | |||
711 | #endif | 711 | #endif |
712 | rest_of_line = buf; | 712 | rest_of_line = buf; |
713 | first_word = next_word(&rest_of_line); | 713 | first_word = next_word(&rest_of_line); |
714 | if (!first_word || *buf == '#') { | 714 | if (!first_word || *first_word == '#') { |
715 | free(buf); | 715 | free(buf); |
716 | continue; /* blank/comment line */ | 716 | continue; /* blank/comment line */ |
717 | } | 717 | } |