Revert "tools/libxl: search PATH for QEMU if QEMU_XEN_PATH is not absolute"

This reverts commit f3ba5baf54, for
breaking the build in gitlab CI.
This commit is contained in:
Jan Beulich committed 2025-04-08 12:37:37 +02:00
1 parent 7a4484d90b
commit e4ff0e4f83
1 file changed
+2 -36
+2 -36
View File
@@ -331,43 +331,9 @@ const char *libxl__domain_device_model(libxl__gc *gc,
case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL:
dm = libxl__abs_path(gc, "qemu-dm", libxl__private_bindir_path());
break;
case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: {
const char *configured_dm = qemu_xen_path(gc);
if (configured_dm[0] == '/')
{
dm = configured_dm;
}
else
{
const char *path_env = getenv("PATH");
if (!path_env)
{
dm = configured_dm;
}
else
{
char *path_dup = libxl__strdup(gc, path_env);
char *saveptr;
char *path = strtok_r(path_dup, ":", &saveptr);
dm = NULL;
while (path)
{
char *candidate = libxl__abs_path(gc, configured_dm, path);
if (access(candidate, X_OK) == 0)
{
dm = candidate;
break;
}
path = strtok_r(NULL, ":", &saveptr);
}
if (!dm)
dm = configured_dm;
}
}
case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN:
dm = qemu_xen_path(gc);
break;
}
default:
LOG(ERROR, "invalid device model version %d",
info->device_model_version);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.