[git commit master] ifup: make /etc/network/interfaces parser tolerant to trailing spaces
Denys Vlasenko
vda.linux at googlemail.com
Sat Oct 17 01:35:10 UTC 2009
commit: http://git.busybox.net/busybox/commit/?id=2ace0ad2d7ee52e44dc98feb77bedf5e866e8f11
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
networking/ifupdown.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index 6b94492..d0c5cce 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -644,6 +644,9 @@ static const struct address_family_t addr_inet = {
#endif /* if ENABLE_FEATURE_IFUPDOWN_IPV4 */
+/* Returns pointer to the next word, or NULL.
+ * In 1st case, advances *buf to the word after this one.
+ */
static char *next_word(char **buf)
{
unsigned length;
@@ -663,7 +666,7 @@ static char *next_word(char **buf)
if (word[length] != '\0')
word[length++] = '\0';
- *buf = word + length;
+ *buf = skip_whitespace(word + length);
return word;
}
--
1.6.3.3
More information about the busybox-cvs
mailing list