diff options
author | Denis Vlasenko | 2008-01-29 09:56:21 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-01-29 09:56:21 +0000 |
commit | c882f341cec8451ee87af6746abb7208272d5b1a (patch) | |
tree | 5d4ebbf08e8dae6c649e1ca47f0d59911313a89b /init | |
parent | 8c638cbf09363388fd9e523d46ee412425754a6a (diff) | |
download | busybox-c882f341cec8451ee87af6746abb7208272d5b1a.zip busybox-c882f341cec8451ee87af6746abb7208272d5b1a.tar.gz |
init: allow last line to be not terminated by '\n'
Diffstat (limited to 'init')
-rw-r--r-- | init/init.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/init/init.c b/init/init.c index 513ff34..9e24817 100644 --- a/init/init.c +++ b/init/init.c @@ -756,11 +756,11 @@ static void parse_inittab(void) /* Skip leading spaces */ id = skip_whitespace(buf); - /* Skip the line if it's a comment */ - if (*id == '#' || *id == '\n') - continue; /* Trim the trailing '\n' */ *strchrnul(id, '\n') = '\0'; + /* Skip the line if it is a comment */ + if (*id == '#' || *id == '\0') + continue; /* Line is: "id:runlevel_ignored:action:command" */ runlev = strchr(id, ':'); |