}
static int copy_one_file(const char *esp_path, const char *name, bool force) {
- char *root = IN_SET(arg_install_source, ARG_INSTALL_SOURCE_AUTO, ARG_INSTALL_SOURCE_IMAGE) ? arg_root : NULL;
+ char *root = IN_SET(arg_install_source, INSTALL_SOURCE_AUTO, INSTALL_SOURCE_IMAGE) ? arg_root : NULL;
_cleanup_free_ char *source_path = NULL, *dest_path = NULL, *p = NULL, *q = NULL;
const char *e;
char *dest_name, *s;
r = chase(p, root, CHASE_PREFIX_ROOT|CHASE_PROHIBIT_SYMLINKS|CHASE_TRIGGER_AUTOFS, &source_path, NULL);
/* If we had a root directory to try, we didn't find it and we are in auto mode, retry on the host */
- if (r == -ENOENT && root && arg_install_source == ARG_INSTALL_SOURCE_AUTO)
+ if (r == -ENOENT && root && arg_install_source == INSTALL_SOURCE_AUTO)
r = chase(p, NULL, CHASE_PREFIX_ROOT|CHASE_PROHIBIT_SYMLINKS|CHASE_TRIGGER_AUTOFS, &source_path, NULL);
if (r < 0)
return log_error_errno(r,
}
static int install_binaries(const char *esp_path, const char *arch, bool force) {
- char *root = IN_SET(arg_install_source, ARG_INSTALL_SOURCE_AUTO, ARG_INSTALL_SOURCE_IMAGE) ? arg_root : NULL;
+ char *root = IN_SET(arg_install_source, INSTALL_SOURCE_AUTO, INSTALL_SOURCE_IMAGE) ? arg_root : NULL;
_cleanup_closedir_ DIR *d = NULL;
_cleanup_free_ char *path = NULL;
int r;
r = chase_and_opendir(BOOTLIBDIR, root, CHASE_PREFIX_ROOT|CHASE_PROHIBIT_SYMLINKS|CHASE_TRIGGER_AUTOFS, &path, &d);
/* If we had a root directory to try, we didn't find it and we are in auto mode, retry on the host */
- if (r == -ENOENT && root && arg_install_source == ARG_INSTALL_SOURCE_AUTO)
+ if (r == -ENOENT && root && arg_install_source == INSTALL_SOURCE_AUTO)
r = chase_and_opendir(BOOTLIBDIR, NULL, CHASE_PREFIX_ROOT|CHASE_PROHIBIT_SYMLINKS|CHASE_TRIGGER_AUTOFS, &path, &d);
if (r == -ENOENT && arg_graceful() != ARG_GRACEFUL_NO) {
log_debug("Source directory does not exist, ignoring.");
bool arg_arch_all = false;
char *arg_root = NULL;
char *arg_image = NULL;
-InstallSource arg_install_source = ARG_INSTALL_SOURCE_AUTO;
+InstallSource arg_install_source = INSTALL_SOURCE_AUTO;
char *arg_efi_boot_option_description = NULL;
bool arg_dry_run = false;
ImagePolicy *arg_image_policy = NULL;
case ARG_INSTALL_SOURCE:
if (streq(optarg, "auto"))
- arg_install_source = ARG_INSTALL_SOURCE_AUTO;
+ arg_install_source = INSTALL_SOURCE_AUTO;
else if (streq(optarg, "image"))
- arg_install_source = ARG_INSTALL_SOURCE_IMAGE;
+ arg_install_source = INSTALL_SOURCE_IMAGE;
else if (streq(optarg, "host"))
- arg_install_source = ARG_INSTALL_SOURCE_HOST;
+ arg_install_source = INSTALL_SOURCE_HOST;
else
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"Unexpected parameter for --install-source=: %s", optarg);
if (arg_root && arg_image)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Please specify either --root= or --image=, the combination of both is not supported.");
- if (arg_install_source != ARG_INSTALL_SOURCE_AUTO && !arg_root && !arg_image)
+ if (arg_install_source != INSTALL_SOURCE_AUTO && !arg_root && !arg_image)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "--install-from-host is only supported with --root= or --image=.");
if (arg_dry_run && argv[optind] && !STR_IN_SET(argv[optind], "unlink", "cleanup"))