const char *device,
const char *password,
const char *keydev,
- const char *options) {
+ const char *options,
+ const char *source) {
_cleanup_free_ char *n = NULL, *d = NULL, *u = NULL, *e = NULL,
*keydev_mount = NULL, *keyfile_timeout_value = NULL,
if (r < 0)
return r;
- r = generator_write_cryptsetup_unit_section(f, arg_crypttab);
+ r = generator_write_cryptsetup_unit_section(f, source);
if (r < 0)
return r;
if (proc_cmdline_value_missing(key, value))
return 0;
- d = get_crypto_device(startswith(value, "luks-") ? value+5 : value);
+ d = get_crypto_device(startswith(value, "luks-") ?: value);
if (!d)
return log_oom();
if (r < 0)
return r;
- r = create_disk(name, device, keyfile, keydev, (d && d->options) ? d->options : options);
+ r = create_disk(name, device, keyfile, keydev, (d && d->options) ? d->options : options, arg_crypttab);
if (r < 0)
return r;
device,
d->keyfile ?: arg_default_keyfile,
d->keydev,
- d->options ?: arg_default_options);
+ d->options ?: arg_default_options,
+ "/proc/cmdline");
if (r < 0)
return r;
}