Displaying 20 results from an estimated 52 matches for "error_fail".
2012 Apr 03
3
[PATCH] xl: Don't require a config file for cpupools
...= NULL;
+ const char *filename = NULL, *config_src=NULL;
const char *p;
char extra_config[1024];
int opt;
@@ -5471,23 +5471,26 @@ int main_cpupoolcreate(int argc, char **
optind++;
}
- if (!filename) {
- help("cpupool-create");
- return -ERROR_FAIL;
- }
-
- if (libxl_read_file_contents(ctx, filename, (void **)&config_data, &config_len)) {
- fprintf(stderr, "Failed to read config file: %s: %s\n",
- filename, strerror(errno));
- return -ERROR_FAIL;
- }
+ if (filename)
+ {
+ if...
2010 Aug 12
0
[PATCH, v2]: xl: Implement per-API-call garbage-collection lifetime
...&ctx->version_info, 0, sizeof(libxl_version_info));
ctx->xch = xc_interface_open(lg,lg,0);
if (!ctx->xch) {
XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, errno,
"cannot open libxc handle");
- free(ctx->alloc_ptrs);
return ERROR_FAIL;
}
@@ -64,7 +59,6 @@ int libxl_ctx_init(libxl_ctx *ctx, int v
XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, errno,
"cannot connect to xenstore");
xc_interface_close(ctx->xch);
- free(ctx->alloc_ptrs);
return ERROR_FAIL;
}...
2012 Jan 26
1
[PATCH v2] libxl: fix mutex initialization
...- * only as an initialiser, not as an expression. */
- memcpy(&ctx->lock, &mutex_value, sizeof(ctx->lock));
+ if (libxl__init_recursive_mutex(ctx, &ctx->lock) < 0) {
+ LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "Failed to initialize mutex");
+ return ERROR_FAIL;
+ }
if ( stat(XENSTORE_PID_FILE, &stat_buf) != 0 ) {
LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Is xenstore daemon running?\n"
diff -r f581bb82fecd -r 259112aee618 tools/libxl/libxl_internal.c
--- a/tools/libxl/libxl_internal.c Sat Jan 14 19:04:48 2012 +0100
+++ b/to...
2012 May 15
5
[PATCH 0 of 4 v3] Add commands to automatically prep devices for pass-through
Add commands to automatically prep devices for pass-through
The current method for passing through devices requires users to
either modify cryptic Linux boot parameters and reboot, or do a lot of
manual reads and writes into sysfs nodes.
This set of patches introduces commands to make this easier. It expands
on the concept of "assignable" (from the list_assignable_devices command).
2013 Apr 18
9
[PATCH v5 1/2] libxl: Introduce functions to add and remove USB devices to an HVM guest
...switch(usbdev->type) {
+ case LIBXL_DEVICE_USB_TYPE_HOSTDEV:
+ dev_path = hostdev_xs_path(gc, domid, usbdev);
+ hostdev_xs_append_params(gc, usbdev, dev);
+ break;
+ default:
+ LOG(ERROR, "Invalid device type: %d", usbdev->type);
+ return ERROR_FAIL;
+ }
+
+ LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Adding new usb device to xenstore");
+
+ for(;;) {
+ rc = libxl__xs_transaction_start(gc, &t);
+ if (rc) goto out;
+
+ /* Helpfully, mkdir returns 0 on failure, 1 on success */
+ rc = libxl__xs_mkdir(gc,...
2013 Mar 02
7
libxl device_disk_add orphans blktap devices on transaction error
I''m using the CentOS 6 bundle of xen from
http://dev.centos.org/centos/6/xen-c6/ and ran into an issue when
creating domains with multiple VHD tap disks. Comparing unstable to
the 4.2.1 code I''m using, it seems this issue still applies. I''m
using a configuration line that looks something like
disk = [
2012 Aug 14
4
[PATCH] libxl: fix usage of backend parameter and run_hotplug_scripts
...)
{
+ int run_hotplug_scripts;
+
if (!nic->mtu)
nic->mtu = 1492;
if (!nic->model) {
@@ -2503,6 +2505,18 @@ int libxl__device_nic_setdefault(libxl__gc *gc, libxl_device_nic *nic,
libxl__xen_script_dir_path()) < 0 )
return ERROR_FAIL;
+ run_hotplug_scripts = libxl__hotplug_settings(gc, XBT_NULL);
+ if (run_hotplug_scripts < 0) {
+ LOG(ERROR, "unable to get current hotplug scripts execution setting");
+ return run_hotplug_scripts;
+ }
+ if (nic->backend_domid != LIBXL_TOOLSTACK_DOMID &...
2013 Nov 22
4
[PATCH 0/2] libxl/xl: two more coverity related fixes
The first patch is a leftover from the switch to
libxl__create_qemu_logfile, and while there it also handles possible
errors when opening /dev/null.
The second one is a fix for the issues present in do_daemonize.
Thanks, Roger.
2012 May 25
2
[PATCH] libxl: When checking BDF of existing slots, function should be decimal, not hex
...lk <konrad.wilk@oracle.com>
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c
--- a/tools/libxl/libxl_pci.c
+++ b/tools/libxl/libxl_pci.c
@@ -480,7 +480,7 @@ static int pciback_dev_has_slot(libxl__g
return ERROR_FAIL;
}
- while(fscanf(f, "%x:%x:%x.%x\n", &dom, &bus, &dev, &func)==4) {
+ while(fscanf(f, "%x:%x:%x.%d\n", &dom, &bus, &dev, &func)==4) {
if(dom == pcidev->domain
&& bus == pcidev->bus
&...
2010 Sep 02
7
[PATCH] libxl: make libxl communicate with xenstored by socket or xenbus driver
...ibxl_utils.c Thu Sep 02 14:51:46 2010 +0100
@@ -368,6 +368,8 @@
int libxl_ctx_postfork(libxl_ctx *ctx) {
if (ctx->xsh) xs_daemon_destroy_postfork(ctx->xsh);
ctx->xsh = xs_daemon_open();
+ if (!ctx->xsh)
+ ctx->xsh = xs_domain_open();
if (!ctx->xsh) return ERROR_FAIL;
return 0;
}
--------------------------------------END----------------------------------------------
Jun Zhu
Citrix Systems UK
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
2011 Nov 04
2
[PATCH V3 REBASE 1/2] libxl_qmp: Introduce libxl__qmp_pci_del
...rc;
}
+static int qmp_device_del(libxl__gc *gc, int domid, char *id)
+{
+ libxl__qmp_handler *qmp = NULL;
+ flexarray_t *parameters = NULL;
+ libxl_key_value_list args = NULL;
+ int rc = 0;
+
+ qmp = libxl__qmp_initialize(libxl__gc_owner(gc), domid);
+ if (!qmp)
+ return ERROR_FAIL;
+
+ parameters = flexarray_make(2, 1);
+ flexarray_append_pair(parameters, "id", id);
+ args = libxl__xs_kvs_of_flexarray(gc, parameters, parameters->count);
+ if (!args)
+ return ERROR_NOMEM;
+
+ rc = qmp_synchronous_send(qmp, "device_del", &args,...
2012 Aug 15
2
[PATCH] libxl: make domain resume API asynchronous
...OG_ERRNO(ctx, LIBXL__LOG_ERROR,
- "xc_domain_resume failed for domain %u",
- domid);
+ if (xc_domain_resume(CTX->xch, domid, suspend_cancel)) {
+ LOGE(ERROR, "xc_domain_resume failed for domain %u", domid);
rc = ERROR_FAIL;
goto out;
}
@@ -418,24 +415,29 @@ int libxl_domain_resume(libxl_ctx *ctx,
if (type == LIBXL_DOMAIN_TYPE_HVM) {
rc = libxl__domain_resume_device_model(gc, domid);
if (rc) {
- LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
- "failed to r...
2013 May 08
1
[PATCH] libxl: make nic 'bridge' parameter optional - do not fill default
...e) {
- nic->bridge = strdup("xenbr0");
- if (!nic->bridge) return ERROR_NOMEM;
- }
if ( !nic->script && asprintf(&nic->script, "%s/vif-bridge",
libxl__xen_script_dir_path()) < 0 )
return ERROR_FAIL;
@@ -2918,8 +2914,10 @@ void libxl__device_nic_add(libxl__egc *egc, uint32_t domid,
nic->rate_interval_usecs));
}
- flexarray_append(back, "bridge");
- flexarray_append(back, libxl__strdup(gc, nic->bridge));
+ if (nic->bridge) {
+...
2012 Feb 08
7
[PATCH] libxl: Set VNC password through QMP
...nt domid,
+ char *device, char *target, char *arg)
+{
+ libxl__qmp_handler *qmp = NULL;
+ flexarray_t *parameters = NULL;
+ libxl_key_value_list args = NULL;
+ int rc = 0;
+
+ qmp = libxl__qmp_initialize(libxl__gc_owner(gc), domid);
+ if (!qmp)
+ return ERROR_FAIL;
+
+ parameters = flexarray_make(6, 1);
+ flexarray_append_pair(parameters, "device", device);
+ flexarray_append_pair(parameters, "target", target);
+ if (arg)
+ flexarray_append_pair(parameters, "arg", arg);
+ args = libxl__xs_kvs_of_flexarray(g...
2009 Nov 18
6
[PATCH 1/3] libxenlight: Clean up logging arrangements
...e_info *info,
ret = xc_domain_create(ctx->xch, info->ssidref, handle, flags, domid);
if (ret < 0) {
- XL_LOG(ctx, XL_LOG_ERROR, "domain creation fail: %d", ret);
+ XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, ret, "domain creation fail");
return ERROR_FAIL;
}
dom_path = libxl_xs_get_dompath(ctx, *domid);
+ if (!dom_path)
+ return ERROR_FAIL;
+
vm_path = libxl_sprintf(ctx, "/vm/%s", uuid_string);
vss_path = libxl_sprintf(ctx, "/vss/%s", uuid_string);
- if (!dom_path || !vm_path || !vss_path) {
+...
2013 Dec 01
70
[PATCH 00/13] Coverity fixes for libxl
Matthew Daley (13):
libxl: fix unsigned less-than-0 comparison in e820_sanitize
libxl: check for xc_domain_setmaxmem failure in libxl__build_pre
libxl: correct file open success check in libxl__device_pci_reset
libxl: don''t leak p in libxl__wait_for_backend
libxl: remove unsigned less-than-0 comparison
libxl: actually abort if initializing a ctx''s lock fails
libxl:
2012 Jul 27
9
[PATCH 0/3] libxl cd-insert/eject with qemu-xen
This patch series provides the facility to eject and insert a cdrom when the
used device-model is qemu-xen. The only difference between both device-model is
a call to a QMP command as `xl cd-insert ...` will still update xenstore, even
if it''s not used by QEMU.
Anthony PERARD (3):
libxl_qmp, Introduce libxl__qmp_insert_cdrom.
libxl_dm: Set an id to cdrom drives with qemuu.
libxl:
2012 May 17
8
[PATCH] libxl: do not overwrite user supplied config when running bootloader
...sk));
if (info->u.pv.cmdline && *info->u.pv.cmdline != ''\0'')
ARG(libxl__sprintf(gc, "--args=%s", info->u.pv.cmdline));
@@ -144,7 +145,6 @@ static int parse_bootloader_result(libxl
char buf[PATH_MAX*2];
FILE *f = 0;
int rc = ERROR_FAIL;
- libxl_domain_build_info *info = bl->info;
f = fopen(bl->outputpath, "r");
if (!f) {
@@ -180,18 +180,15 @@ static int parse_bootloader_result(libxl
#define COMMAND(s) ((rhs = bootloader_result_command(gc, buf, s, sizeof(s)-1)))
if (COMMAND("kernel&q...
2012 Sep 21
8
PATCH [base vtpm and libxl patches 4/6] add iomem support to libxl
...io->start, io->number, 1);
+ if ( ret<0 ){
+ LOGE(ERROR,
+ "failed give dom%d access to iomem range
%"PRIx64"-%"PRIx64,
+ domid, io->start, io->start + io->number - 1);
+ ret = ERROR_FAIL;
+ }
+ }
+
+
+
for (i = 0; i < d_config->num_nics; i++) {
/* We have to init the nic here, because we still haven''t
* called libxl_device_nic_add at this point, but qemu needs
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
---...
2012 Feb 09
7
[PATCH V2 0/3] Set VNC password to QEMU upstream
Anthony PERARD (3):
libxl_qmp: Use GC instead of CTX as parameter for _initialize.
Provide dm_vnc() as a in libxl helper.
libxl: Set VNC password through QMP
tools/libxl/libxl_create.c | 2 +-
tools/libxl/libxl_dm.c | 32 ++++++++++++++----------
tools/libxl/libxl_internal.h | 7 ++++-
tools/libxl/libxl_qmp.c | 55 ++++++++++++++++++++++++++++++-----------
4 files