- if (arg_proc_cmdline_options) {
- /*
- If options are specified on the kernel commandline, use them.
- */
- char **j;
-
- STRV_FOREACH(j, arg_proc_cmdline_options) {
- _cleanup_free_ char *proc_uuid = NULL, *proc_options = NULL;
- const char *s = *j;
- int k;
-
- k = sscanf(s, "%m[0-9a-fA-F-]=%ms", &proc_uuid, &proc_options);
- if (k == 2) {
- if (streq(proc_uuid, device + 5)) {
- if (options)
- free(options);
- options = strdup(proc_options);
- if (!options)
- return log_oom();
- }
- } else if (!options) {
- /*
- Fall back to options without a specified UUID
- */
- options = strdup(s);
- if (!options)
- return log_oom();
- }
- }
- }