mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable.git
synced 2025-09-13 11:07:46 +10:00
modpost: trim leading spaces when processing source files list
[ Upstream commit5d9a16b2a4
] get_line() does not trim the leading spaces, but the parse_source_files() expects to get lines with source files paths where the first space occurs after the file path. Fixes:70f30cfe5b
("modpost: use read_text_file() and get_line() for reading text files") Signed-off-by: Radek Krejci <radek.krejci@oracle.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
7a14b8a477
commit
ca188f2512
@ -328,7 +328,12 @@ static int parse_source_files(const char *objfile, struct md4_ctx *md)
|
||||
|
||||
/* Sum all files in the same dir or subdirs. */
|
||||
while ((line = get_line(&pos))) {
|
||||
char* p = line;
|
||||
char* p;
|
||||
|
||||
/* trim the leading spaces away */
|
||||
while (isspace(*line))
|
||||
line++;
|
||||
p = line;
|
||||
|
||||
if (strncmp(line, "source_", sizeof("source_")-1) == 0) {
|
||||
p = strrchr(line, ' ');
|
||||
|
Loading…
Reference in New Issue
Block a user