← Commit list

c882f341c

Denis Vlasenko
Denis Vlasenko
2008-01-29
FAILED Duration: 22s

Subject

init: allow last line to be not terminated by '\n'

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

init/init.c+3 -3
@@ -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, ':');