diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-08-08 19:44:52 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-08-08 20:16:31 +0200 |
commit | a8d3315ba410de0db154516d945b0731656a41d8 (patch) | |
tree | 601382dedfb235754b93234f9f9a48ab70b646ac /src/fstab-generator | |
parent | resolve: ignore nameserver= and domain= kernel command line options without v... (diff) | |
download | systemd-a8d3315ba410de0db154516d945b0731656a41d8.tar.xz systemd-a8d3315ba410de0db154516d945b0731656a41d8.zip |
tree-wise: drop unnecessary use of proc_cmdline_key_streq()
If the key does not contain '-' or '_', then it is not necessary to use
proc_cmdline_key_streq(), and streq() is sufficient.
This also adds missing assertions about 'key' argument.
Diffstat (limited to 'src/fstab-generator')
-rw-r--r-- | src/fstab-generator/fstab-generator.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index 041789673f..c88f5d4b47 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -1355,6 +1355,8 @@ static int add_mounts_from_creds(bool prefix_sysroot) { static int parse_proc_cmdline_item(const char *key, const char *value, void *data) { int r; + assert(key); + /* root=, usr=, usrfstype= and roofstype= may occur more than once, the last * instance should take precedence. In the case of multiple rootflags= * or usrflags= the arguments should be concatenated */ |