1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-01 05:47:04 +03:00

proc-cmdline: use read_virtual_file() for /proc/cmdline

(cherry picked from commit 943aca96f77d0ed0bf20385bb3718475438105ce)
(cherry picked from commit 5f729e382afef2a6c96b32ea7e7e8544bbab5fbb)
This commit is contained in:
Lennart Poettering 2023-11-01 11:26:03 +01:00 committed by Luca Boccassi
parent 0bf2ccc4a0
commit f912ef6dc1

View File

@ -35,8 +35,8 @@ int proc_cmdline(char **ret) {
if (detect_container() > 0)
return get_process_cmdline(1, SIZE_MAX, 0, ret);
else
return read_one_line_file("/proc/cmdline", ret);
return read_virtual_file("/proc/cmdline", SIZE_MAX, ret, NULL);
}
static int proc_cmdline_extract_first(const char **p, char **ret_word, ProcCmdlineFlags flags) {