- if (arg_disks) {
- /*
- If luks UUIDs are specified on the kernel command line, use them as a filter
- for /etc/crypttab and only generate units for those.
- */
- STRV_FOREACH(i, arg_disks) {
- _cleanup_free_ char *proc_device = NULL, *proc_name = NULL;
- const char *p = *i;
-
- if (startswith(p, "luks-"))
- p += 5;
-
- proc_name = strappend("luks-", p);
- proc_device = strappend("UUID=", p);
-
- if (!proc_name || !proc_device) {
- log_oom();
- goto cleanup;
- }
-
- if (streq(proc_device, device) || streq(proc_name, name)) {
- if (create_disk(name, device, password, options) < 0)
- goto cleanup;
-
- if (strv_extend(&disks_done, p) < 0) {
- log_oom();
- goto cleanup;
- }
- }
- }
- } else if (create_disk(name, device, password, options) < 0)
- goto cleanup;