summaryrefslogtreecommitdiff
path: root/mm/shmem.c
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-06-01 14:57:17 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2020-06-06 23:38:12 +0900
commitac5100f54329676469688d1b5415cd8d6428c909 (patch)
treeffedf7989d74b9cbba21ddc043576fb35a659cbd /mm/shmem.c
parent4ddea2f8e825a86e94011ebc32eb1dce220b2316 (diff)
modpost: add read_text_file() and get_line() helpers
modpost uses grab_file() to open a file, but it is not suitable for a text file because the mmap'ed file is not terminated by null byte. Actually, I see some issues for the use of grab_file(). The new helper, read_text_file() loads the whole file content into a malloc'ed buffer, and appends a null byte. Then, get_line() reads each line. To handle text files, I intend to replace as follows: grab_file() -> read_text_file() get_new_line() -> get_line() Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'mm/shmem.c')
0 files changed, 0 insertions, 0 deletions