break;
case ARG_IMAGE:
-#ifdef STANDALONE
- return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP),
- "This systemd-sysusers version is compiled without support for --image=.");
-#else
r = parse_path_argument(optarg, /* suppress_root= */ false, &arg_image);
if (r < 0)
return r;
break;
-#endif
case ARG_IMAGE_POLICY:
r = parse_image_policy_argument(optarg, &arg_image_policy);
}
static int run(int argc, char *argv[]) {
-#ifndef STANDALONE
_cleanup_(loop_device_unrefp) LoopDevice *loop_device = NULL;
_cleanup_(umount_and_freep) char *mounted_dir = NULL;
-#endif
_cleanup_close_ int lock = -EBADF;
_cleanup_(context_done) Context c = {
.audit_fd = -EBADF,
if (r < 0)
return r;
-#ifndef STANDALONE
if (arg_image) {
assert(!arg_root);
if (!arg_root)
return log_oom();
}
-#else
- assert(!arg_image);
-#endif
/* Prepare to emit audit events, but only if we're operating on the host system. */
if (!arg_root)
break;
case ARG_IMAGE:
-#ifdef STANDALONE
- return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP),
- "This systemd-tmpfiles version is compiled without support for --image=.");
-#else
r = parse_path_argument(optarg, /* suppress_root= */ false, &arg_image);
if (r < 0)
return r;
-#endif
+
/* Imply -E here since it makes little sense to create files persistently in the /run mountpoint of a disk image */
_fallthrough_;
ItemArray, item_array_free);
static int run(int argc, char *argv[]) {
-#ifndef STANDALONE
_cleanup_(loop_device_unrefp) LoopDevice *loop_device = NULL;
_cleanup_(umount_and_freep) char *mounted_dir = NULL;
-#endif
_cleanup_strv_free_ char **config_dirs = NULL;
_cleanup_(context_done) Context c = {};
bool invalid_config = false;
if (r < 0)
return r;
-#ifndef STANDALONE
if (arg_image) {
assert(!arg_root);
if (!arg_root)
return log_oom();
}
-#else
- assert(!arg_image);
-#endif
c.items = ordered_hashmap_new(&item_array_hash_ops);
c.globs = ordered_hashmap_new(&item_array_hash_ops);