STATIC_DESTRUCTOR_REGISTER(arg_usr_hash_what, freep);
STATIC_DESTRUCTOR_REGISTER(arg_usr_options, freep);
-static int create_device(
+static int create_special_device(
const char *name,
const char *service,
const char *roothash,
_cleanup_fclose_ FILE *f = NULL;
int r;
+ /* Creates a systemd-veritysetup@.service instance for the special kernel cmdline specified root + usr devices. */
+
assert(name);
assert(service);
}
static int create_root_device(void) {
- return create_device("root", SYSTEMD_VERITYSETUP_SERVICE_ROOT, arg_root_hash, arg_root_data_what, arg_root_hash_what, arg_root_options);
+ return create_special_device("root", SYSTEMD_VERITYSETUP_SERVICE_ROOT, arg_root_hash, arg_root_data_what, arg_root_hash_what, arg_root_options);
}
static int create_usr_device(void) {
- return create_device("usr", SYSTEMD_VERITYSETUP_SERVICE_USR, arg_usr_hash, arg_usr_data_what, arg_usr_hash_what, arg_usr_options);
+ return create_special_device("usr", SYSTEMD_VERITYSETUP_SERVICE_USR, arg_usr_hash, arg_usr_data_what, arg_usr_hash_what, arg_usr_options);
}
static int parse_proc_cmdline_item(const char *key, const char *value, void *data) {
STR_IN_SET(name, "root", "usr");
}
-static int create_disk(
+static int create_veritytab_device(
const char *name,
const char *data_device,
const char *hash_device,
bool noauto, nofail, netdev, need_loop = false;
int r;
+ /* Creates a systemd-veritysetup@.service instance for volumes specified in /etc/veritytab. */
+
assert(name);
assert(data_device);
assert(hash_device);
if (!hash_uuid)
hash_uuid = path_startswith(hash_device, "/dev/disk/by-uuid/");
- r = create_disk(name,
+ r = create_veritytab_device(
+ name,
data_device,
hash_device,
roothash,