break;
case ARG_INTERVAL:
- r = parse_usec(optarg, &arg_interval);
+ r = parse_sec(optarg, &arg_interval);
if (r < 0 || arg_interval <= 0) {
log_error("Failed to parse sealing key change interval: %s", optarg);
return -EINVAL;
else if (S_ISBLK(st.st_mode))
asprintf(&t, "_KERNEL_DEVICE=b%u:%u", major(st.st_rdev), minor(st.st_rdev));
else {
- log_error("File is not a device node, regular file or is not executable: %s", *i);
+ log_error("File is neither a device node, nor regular file, nor executable: %s", *i);
return -EINVAL;
}
arg_action == ACTION_LIST_CATALOG ||
arg_action == ACTION_DUMP_CATALOG) {
- char _cleanup_free_ *database;
- database = strjoin(arg_root, "/", CATALOG_DATABASE, NULL);
- if (!database) {
- r = log_oom();
- goto finish;
+ const char* database = CATALOG_DATABASE;
+ char _cleanup_free_ *copy = NULL;
+ if (arg_root) {
+ copy = strjoin(arg_root, "/", CATALOG_DATABASE, NULL);
+ if (!database) {
+ r = log_oom();
+ goto finish;
+ }
+ path_kill_slashes(copy);
+ database = copy;
}
if (arg_action == ACTION_UPDATE_CATALOG) {