From nobody Fri Dec 19 06:34:21 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678464695; cv=none; d=zohomail.com; s=zohoarc; b=d5DeP69YPK0uWu3KvCohNEAmVQ3Cgfxp/X7zEcCimcqq8HEoNi3X7PQ5Z7wZsl6wtr7D0jW9E4ONIO3AODqPZ/2qaSHYFWkF79oEN4CcPEgkjNA2/4KzBrJ0BH9dHx2j6ZOzIe5BWBRie4I6Z7f4sB2/pLsddvDY5aEUCwp0KmY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464695; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=h6WYc1vzJJYCGj7EfB34SKMbnwQwYqNicpLhGpAORNc=; b=JlyvDgMnuVBS/uvYn77668VqFdQ+T2EnSHLHBxUk4ePlguWR8N8riEk5sL4ggVXVi+nYRnuyU0KAjOnX1TdAMfBZWCgndx0wj7xSs3dYiR8d5VuOlMzKyLJgm3bEzVHW/XndTCu0dImfeXaJbQPFJAkvOOcic5m5BGozeiumEBo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 167846469568878.55689396902778; Fri, 10 Mar 2023 08:11:35 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-227-eEDnifFXNZCy6CRFIOsDrw-1; Fri, 10 Mar 2023 11:11:24 -0500 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 96087857A89; Fri, 10 Mar 2023 16:10:36 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7476F492B01; Fri, 10 Mar 2023 16:10:36 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 664B81946A4A; Fri, 10 Mar 2023 16:10:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 95E6A1946587 for ; Fri, 10 Mar 2023 16:10:35 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8C56D492B00; Fri, 10 Mar 2023 16:10:35 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id EEEF2492C3E for ; Fri, 10 Mar 2023 16:10:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464694; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=h6WYc1vzJJYCGj7EfB34SKMbnwQwYqNicpLhGpAORNc=; b=Qf1Xiip4zwtROrhaxE4Bsb789oYKdqPHkPAmXJ4W+bf2qX7Wo7ClgKF1S0B1Ybp2wVKWxv trJeaQyRAF2C5PRY9AYifFwmNRUbGaiBtjDhFA1ha+BFrNDbMdE4+KvOG4EKz1N+vvRGse K1JbKJsNwTXSMOsoEbGbnbwVsn2ca5k= X-MC-Unique: eEDnifFXNZCy6CRFIOsDrw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 16/51] libxl: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:32 +0100 Message-Id: <2c417434371935f7618c7a21967216cb0a01275c.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1678464697216100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/libxl/libxl_capabilities.c | 2 +- src/libxl/libxl_conf.c | 61 +++++----- src/libxl/libxl_domain.c | 24 ++-- src/libxl/libxl_driver.c | 215 ++++++++++++++++----------------- src/libxl/libxl_migration.c | 6 +- src/libxl/xen_common.c | 72 +++++------ src/libxl/xen_xl.c | 28 ++--- src/libxl/xen_xm.c | 4 +- 8 files changed, 201 insertions(+), 211 deletions(-) diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c index c2975d637e..cd40cff739 100644 --- a/src/libxl/libxl_capabilities.c +++ b/src/libxl/libxl_capabilities.c @@ -348,7 +348,7 @@ libxlCapsInitGuests(libxl_ctx *ctx, virCaps *caps) regex =3D g_regex_new(XEN_CAP_REGEX, 0, 0, &err); if (!regex) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to compile regex %s"), err->message); + _("Failed to compile regex %1$s"), err->message); return -1; } =20 diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 15369b2791..12a0eb7085 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -186,7 +186,7 @@ libxlMakeDomCreateInfo(libxl_ctx *ctx, strlen(def->seclabels[0]->label), &c_info->ssidref)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight failed to resolve security label= '%s'"), + _("libxenlight failed to resolve security label= '%1$s'"), def->seclabels[0]->label); } } @@ -194,7 +194,7 @@ libxlMakeDomCreateInfo(libxl_ctx *ctx, virUUIDFormat(def->uuid, uuidstr); if (libxl_uuid_from_string(&c_info->uuid, uuidstr)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight failed to parse UUID '%s'"), uuidstr= ); + _("libxenlight failed to parse UUID '%1$s'"), uuids= tr); goto error; } =20 @@ -272,7 +272,7 @@ libxlMakeChrdevStr(virDomainChrDef *def, char **buf) =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported chardev '%s'"), type); + _("unsupported chardev '%1$s'"), type); return -1; } =20 @@ -384,7 +384,7 @@ libxlMakeDomBuildInfo(virDomainDef *def, =20 case VIR_DOMAIN_CLOCK_OFFSET_TIMEZONE: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported clock offset '%s'"), + _("unsupported clock offset '%1$s'"), virDomainClockOffsetTypeToString(clock.offset)); return -1; =20 @@ -392,7 +392,7 @@ libxlMakeDomBuildInfo(virDomainDef *def, case VIR_DOMAIN_CLOCK_OFFSET_LAST: default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unexpected clock offset '%d'"), clock.offset); + _("unexpected clock offset '%1$d'"), clock.offset); return -1; } =20 @@ -421,7 +421,7 @@ libxlMakeDomBuildInfo(virDomainDef *def, case VIR_DOMAIN_TIMER_NAME_HPET: if (!hvm) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported timer type (name) '%s'"), + _("unsupported timer type (name) '%1$s'"), virDomainTimerNameTypeToString(clock.timers= [i]->name)); return -1; } @@ -436,7 +436,7 @@ libxlMakeDomBuildInfo(virDomainDef *def, case VIR_DOMAIN_TIMER_NAME_PIT: case VIR_DOMAIN_TIMER_NAME_ARMVTIMER: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported timer type (name) '%s'"), + _("unsupported timer type (name) '%1$s'"), virDomainTimerNameTypeToString(clock.timers[i]-= >name)); return -1; =20 @@ -503,7 +503,7 @@ libxlMakeDomBuildInfo(virDomainDef *def, false)); if (libxl_cpuid_parse_config(&b_info->cpuid, x= lCPU)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported cpu feature '%s'"), + _("unsupported cpu feature '%1$s'"= ), def->cpu->features[i].name); return -1; } @@ -524,7 +524,7 @@ libxlMakeDomBuildInfo(virDomainDef *def, def->cpu->features[i].name, fal= se)); if (libxl_cpuid_parse_config(&b_info->cpuid, x= lCPU)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported cpu feature '%s'"), + _("unsupported cpu feature '%1$s'"= ), def->cpu->features[i].name); return -1; } @@ -542,7 +542,7 @@ libxlMakeDomBuildInfo(virDomainDef *def, libxl_defbool_set(&b_info->u.hvm.nested_hvm, hasHwVirt); } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported nested HVM setting for %s machine o= n this Xen version"), + _("unsupported nested HVM setting for %1$s machine= on this Xen version"), def->os.machine); return -1; } @@ -658,7 +658,7 @@ libxlMakeDomBuildInfo(virDomainDef *def, =20 if (def->os.loader && def->os.loader->format !=3D VIR_STORAGE_FILE= _RAW) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported loader format '%s'"), + _("Unsupported loader format '%1$s'"), virStorageFileFormatTypeToString(def->os.loader= ->format)); return -1; } @@ -666,14 +666,14 @@ libxlMakeDomBuildInfo(virDomainDef *def, if (def->emulator) { if (!virFileExists(def->emulator)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("emulator '%s' not found"), + _("emulator '%1$s' not found"), def->emulator); return -1; } =20 if (!virFileIsExecutable(def->emulator)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("emulator '%s' is not executable"), + _("emulator '%1$s' is not executable"), def->emulator); return -1; } @@ -800,7 +800,7 @@ libxlMakeDomBuildInfo(virDomainDef *def, case VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO_TRANSITIONAL: case VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO_NON_TRANSITIONAL: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported balloon device model '%s'"), + _("unsupported balloon device model '%1$s'"), virDomainMemballoonModelTypeToString(def->memba= lloon->model)); return -1; case VIR_DOMAIN_MEMBALLOON_MODEL_NONE: @@ -894,7 +894,7 @@ libxlMakeVnumaList(virDomainDef *def, bitmap =3D virDomainNumaGetNodeCpumask(numa, i); if (bitmap =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("vnuma sibling %zu missing vcpus set"), i); + _("vnuma sibling %1$zu missing vcpus set"), i); goto cleanup; } =20 @@ -980,14 +980,14 @@ libxlMakeNetworkDiskSrcStr(virStorageSource *src, case VIR_STORAGE_NET_PROTOCOL_LAST: case VIR_STORAGE_NET_PROTOCOL_NONE: virReportError(VIR_ERR_NO_SUPPORT, - _("Unsupported network block protocol '%s'"), + _("Unsupported network block protocol '%1$s'"), virStorageNetProtocolTypeToString(src->protocol)); return NULL; =20 case VIR_STORAGE_NET_PROTOCOL_RBD: if (strchr(src->path, ':')) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("':' not allowed in RBD source volume name '%= s'"), + _("':' not allowed in RBD source volume name '%= 1$s'"), src->path); return NULL; } @@ -1115,8 +1115,7 @@ libxlMakeDisk(virDomainDiskDef *l_disk, libxl_device_= disk *x_disk) break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight does not support disk format= %s " - "with disk driver %s"), + _("libxenlight does not support disk format= %1$s with disk driver %2$s"), virStorageFileFormatTypeToString(format), driver); return -1; @@ -1141,8 +1140,7 @@ libxlMakeDisk(virDomainDiskDef *l_disk, libxl_device_= disk *x_disk) break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight does not support disk format= %s " - "with disk driver %s"), + _("libxenlight does not support disk format= %1$s with disk driver %2$s"), virStorageFileFormatTypeToString(format), driver); return -1; @@ -1150,8 +1148,7 @@ libxlMakeDisk(virDomainDiskDef *l_disk, libxl_device_= disk *x_disk) } else if (STREQ(driver, "file")) { if (format !=3D VIR_STORAGE_FILE_RAW) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight does not support disk format= %s " - "with disk driver %s"), + _("libxenlight does not support disk format= %1$s with disk driver %2$s"), virStorageFileFormatTypeToString(format), driver); return -1; @@ -1161,8 +1158,7 @@ libxlMakeDisk(virDomainDiskDef *l_disk, libxl_device_= disk *x_disk) } else if (STREQ(driver, "phy")) { if (format !=3D VIR_STORAGE_FILE_RAW) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight does not support disk format= %s " - "with disk driver %s"), + _("libxenlight does not support disk format= %1$s with disk driver %2$s"), virStorageFileFormatTypeToString(format), driver); return -1; @@ -1171,7 +1167,7 @@ libxlMakeDisk(virDomainDiskDef *l_disk, libxl_device_= disk *x_disk) x_disk->backend =3D LIBXL_DISK_BACKEND_PHY; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight does not support disk driver %s"= ), + _("libxenlight does not support disk driver %1$= s"), driver); return -1; } @@ -1409,7 +1405,7 @@ libxlMakeNic(virDomainDef *def, case VIR_DOMAIN_NET_TYPE_VDS: case VIR_DOMAIN_NET_TYPE_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported interface type %s"), + _("unsupported interface type %1$s"), virDomainNetTypeToString(l_nic->type)); goto cleanup; } @@ -1728,7 +1724,7 @@ libxlGetAutoballoonConf(libxlDriverConfig *cfg, 0, 0, &err); if (!regex) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to compile regex %s"), err->message); + _("Failed to compile regex %1$s"), err->message); return -1; } =20 @@ -1791,7 +1787,7 @@ libxlDriverConfigInit(libxlDriverConfig *cfg) =20 if (g_mkdir_with_parents(cfg->logDir, 0777) < 0) { virReportSystemError(errno, - _("failed to create log dir '%s'"), + _("failed to create log dir '%1$s'"), cfg->logDir); return -1; } @@ -2196,8 +2192,7 @@ libxlMakeUSB(virDomainHostdevDef *hostdev, libxl_devi= ce_usbdev *usbdev) } else { if (virHostdevFindUSBDevice(hostdev, true, &usb) < 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("failed to find USB device busnum:devnum " - "for %x:%x"), + _("failed to find USB device busnum:devnum for = %1$x:%2$x"), usbsrc->vendor, usbsrc->product); goto cleanup; } @@ -2390,7 +2385,7 @@ libxlMakeVideo(virDomainDef *def, libxl_domain_config= *d_config) case VIR_DOMAIN_VIDEO_TYPE_LAST: default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("video type %s is not supported by libxl"), + _("video type %1$s is not supported by libxl"), virDomainVideoTypeToString(def->videos[0]->type= )); return -1; } @@ -2421,7 +2416,7 @@ libxlDriverNodeGetInfo(libxlDriverPrivate *driver, vi= rNodeInfoPtr info) =20 if (virStrcpyStatic(info->model, virArchToString(hostarch)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("host arch %s is too big for destination"), + _("host arch %1$s is too big for destination"), virArchToString(hostarch)); goto cleanup; } diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index f28a6207a3..6c167df63e 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -153,8 +153,7 @@ libxlDomainDeviceDefPostParse(virDomainDeviceDef *dev, /* forbid capabilities mode hostdev in this kind of hypervisor */ if (hostdev->mode =3D=3D VIR_DOMAIN_HOSTDEV_MODE_CAPABILITIES) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("hostdev mode 'capabilities' is not " - "supported in %s"), + _("hostdev mode 'capabilities' is not supported= in %1$s"), virDomainVirtTypeToString(def->virtType)); return -1; } @@ -339,7 +338,7 @@ libxlDomainDefValidate(const virDomainDef *def, case VIR_DOMAIN_SOUND_MODEL_ICH9: case VIR_DOMAIN_SOUND_MODEL_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported audio model %s"), + _("unsupported audio model %1$s"), virDomainSoundModelTypeToString(snd->model)); return -1; } @@ -379,7 +378,7 @@ libxlDomainShutdownHandleRestart(libxlDriverPrivate *dr= iver, libxlDomainDestroyInternal(driver, vm); libxlDomainCleanup(driver, vm); if (libxlDomainStartNew(driver, vm, false) < 0) { - VIR_ERROR(_("Failed to restart VM '%s': %s"), + VIR_ERROR(_("Failed to restart VM '%1$s': %2$s"), vm->def->name, virGetLastErrorMessage()); } } @@ -489,8 +488,7 @@ libxlDomainShutdownThread(void *opaque) =20 if (libxlRetrieveDomainConfigurationWrapper(cfg->ctx, vm->def->id, &d_config) !=3D 0) { - VIR_ERROR(_("Failed to retrieve config for VM '%s'. " - "Unable to perform soft reset. Destroying VM"), + VIR_ERROR(_("Failed to retrieve config for VM '%1$s'. Unable t= o perform soft reset. Destroying VM"), vm->def->name); libxlDomainShutdownHandleDestroy(driver, vm); goto endjob; @@ -503,7 +501,7 @@ libxlDomainShutdownThread(void *opaque) =20 if (libxl_domain_soft_reset(cfg->ctx, &d_config, vm->def->id, NULL, NULL) !=3D 0) { - VIR_ERROR(_("Failed to soft reset VM '%s'. Destroying VM"), + VIR_ERROR(_("Failed to soft reset VM '%1$s'. Destroying VM"), vm->def->name); libxlDomainShutdownHandleDestroy(driver, vm); goto endjob; @@ -675,7 +673,7 @@ libxlDomainSaveImageOpen(libxlDriverPrivate *driver, =20 if ((fd =3D virFileOpenAs(from, O_RDONLY, 0, -1, -1, 0)) < 0) { virReportSystemError(-fd, - _("Failed to open domain image file '%s'"), f= rom); + _("Failed to open domain image file '%1$s'"),= from); goto error; } =20 @@ -692,14 +690,14 @@ libxlDomainSaveImageOpen(libxlDriverPrivate *driver, =20 if (hdr.version > LIBXL_SAVE_VERSION) { virReportError(VIR_ERR_OPERATION_FAILED, - _("image version is not supported (%d > %d)"), + _("image version is not supported (%1$d > %2$d)"), hdr.version, LIBXL_SAVE_VERSION); goto error; } =20 if (hdr.xmlLen <=3D 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("invalid XML length: %d"), hdr.xmlLen); + _("invalid XML length: %1$d"), hdr.xmlLen); goto error; } =20 @@ -1256,11 +1254,11 @@ libxlDomainStartPerform(libxlDriverPrivate *driver, if (libxlret) { if (restore_fd < 0) virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight failed to create new domain '%s'= "), + _("libxenlight failed to create new domain '%1$= s'"), d_config.c_info.name); else virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight failed to restore domain '%s'"), + _("libxenlight failed to restore domain '%1$s'"= ), d_config.c_info.name); goto cleanup; } @@ -1399,7 +1397,7 @@ libxlDomainStartNew(libxlDriverPrivate *driver, virUUIDFormat(vm->def->uuid, vm_uuidstr); virUUIDFormat(def->uuid, def_uuidstr); virReportError(VIR_ERR_OPERATION_FAILED, - _("cannot restore domain '%s' uuid %s from a fi= le which belongs to domain '%s' uuid %s"), + _("cannot restore domain '%1$s' uuid %2$s from = a file which belongs to domain '%3$s' uuid %4$s"), vm->def->name, vm_uuidstr, def->name, def_uuids= tr); goto cleanup; } diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 04e74086e6..68c4c7b768 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -307,7 +307,7 @@ libxlDomObjFromDomain(virDomainPtr dom) if (!vm) { virUUIDFormat(dom->uuid, uuidstr); virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching uuid '%s' (%s)"), + _("no domain with matching uuid '%1$s' (%2$s)"), uuidstr, dom->name); return NULL; } @@ -332,7 +332,7 @@ libxlAutostartDomain(virDomainObj *vm, if (vm->autostart && !virDomainObjIsActive(vm) && libxlDomainStartNew(driver, vm, false) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to autostart VM '%s': %s"), + _("Failed to autostart VM '%1$s': %2$s"), vm->def->name, virGetLastErrorMessage()); goto endjob; } @@ -721,31 +721,31 @@ libxlStateInitialize(bool privileged, libxl_driver->config =3D cfg; if (g_mkdir_with_parents(cfg->stateDir, 0777) < 0) { virReportSystemError(errno, - _("failed to create state dir '%s'"), + _("failed to create state dir '%1$s'"), cfg->stateDir); goto error; } if (g_mkdir_with_parents(cfg->libDir, 0777) < 0) { virReportSystemError(errno, - _("failed to create lib dir '%s'"), + _("failed to create lib dir '%1$s'"), cfg->libDir); goto error; } if (g_mkdir_with_parents(cfg->saveDir, 0777) < 0) { virReportSystemError(errno, - _("failed to create save dir '%s'"), + _("failed to create save dir '%1$s'"), cfg->saveDir); goto error; } if (g_mkdir_with_parents(cfg->autoDumpDir, 0777) < 0) { virReportSystemError(errno, - _("failed to create dump dir '%s'"), + _("failed to create dump dir '%1$s'"), cfg->autoDumpDir); goto error; } if (g_mkdir_with_parents(cfg->channelDir, 0777) < 0) { virReportSystemError(errno, - _("failed to create channel dir '%s'"), + _("failed to create channel dir '%1$s'"), cfg->channelDir); goto error; } @@ -875,7 +875,7 @@ libxlConnectOpen(virConnectPtr conn, STRNEQ(conn->uri->path, "/") && STRNEQ(conn->uri->path, "/system")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected Xen URI path '%s', try xen:///system"= ), + _("unexpected Xen URI path '%1$s', try xen:///syste= m"), conn->uri->path); return VIR_DRV_OPEN_ERROR; } @@ -1169,7 +1169,7 @@ libxlDomainSuspend(virDomainPtr dom) if (virDomainObjGetState(vm, NULL) !=3D VIR_DOMAIN_PAUSED) { if (libxlDomainPauseWrapper(cfg->ctx, vm->def->id) !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to suspend domain '%d' with libxenlig= ht"), + _("Failed to suspend domain '%1$d' with libxenl= ight"), vm->def->id); goto endjob; } @@ -1222,7 +1222,7 @@ libxlDomainResume(virDomainPtr dom) if (virDomainObjGetState(vm, NULL) =3D=3D VIR_DOMAIN_PAUSED) { if (libxlDomainUnpauseWrapper(cfg->ctx, vm->def->id) !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to resume domain '%d' with libxenligh= t"), + _("Failed to resume domain '%1$d' with libxenli= ght"), vm->def->id); goto endjob; } @@ -1281,7 +1281,7 @@ libxlDomainShutdownFlags(virDomainPtr dom, unsigned i= nt flags) =20 if (ret !=3D ERROR_NOPARAVIRT) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to shutdown domain '%d' with libxenli= ght"), + _("Failed to shutdown domain '%1$d' with libxen= light"), vm->def->id); ret =3D -1; goto cleanup; @@ -1296,7 +1296,7 @@ libxlDomainShutdownFlags(virDomainPtr dom, unsigned i= nt flags) goto cleanup; =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to shutdown domain '%d' with libxenlight"= ), + _("Failed to shutdown domain '%1$d' with libxenligh= t"), vm->def->id); ret =3D -1; } @@ -1343,7 +1343,7 @@ libxlDomainReboot(virDomainPtr dom, unsigned int flag= s) goto cleanup; =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to reboot domain '%d' with libxenlight"), + _("Failed to reboot domain '%1$d' with libxenlight"= ), vm->def->id); ret =3D -1; } @@ -1382,7 +1382,7 @@ libxlDomainDestroyFlags(virDomainPtr dom, =20 if (libxlDomainDestroyInternal(driver, vm) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to destroy domain '%d'"), vm->def->id); + _("Failed to destroy domain '%1$d'"), vm->def->id); goto endjob; } =20 @@ -1430,7 +1430,7 @@ libxlDomainPMSuspendForDuration(virDomainPtr dom, virCheckFlags(0, -1); if (target !=3D VIR_NODE_SUSPEND_TARGET_MEM) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("PMSuspend type %d not supported by libxenlight driver"), + _("PMSuspend type %1$d not supported by libxenlight driver= "), target); return -1; } @@ -1462,7 +1462,7 @@ libxlDomainPMSuspendForDuration(virDomainPtr dom, =20 if (ret < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to suspend domain '%d'"), vm->def->id); + _("Failed to suspend domain '%1$d'"), vm->def->id); goto endjob; } =20 @@ -1513,7 +1513,7 @@ libxlDomainPMWakeup(virDomainPtr dom, unsigned int fl= ags) priv =3D vm->privateData; if (libxl_domain_resume(cfg->ctx, vm->def->id, 1, NULL) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to resume domain '%d'"), vm->def->id); + _("Failed to resume domain '%1$d'"), vm->def->id); goto endjob; } virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, VIR_DOMAIN_RUNNING_WAKEUP= ); @@ -1647,8 +1647,8 @@ libxlDomainSetMemoryFlags(virDomainPtr dom, unsigned = long newmem, if (flags & VIR_DOMAIN_MEM_LIVE) { if (libxl_domain_setmaxmem(cfg->ctx, vm->def->id, newmem) < 0)= { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to set maximum memory for domain = '%d'" - " with libxenlight"), vm->def->id); + _("Failed to set maximum memory for domain = '%1$d' with libxenlight"), + vm->def->id); goto endjob; } } @@ -1680,8 +1680,8 @@ libxlDomainSetMemoryFlags(virDomainPtr dom, unsigned = long newmem, virObjectLock(vm); if (res < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to set memory for domain '%d'" - " with libxenlight"), vm->def->id); + _("Failed to set memory for domain '%1$d' w= ith libxenlight"), + vm->def->id); goto endjob; } vm->def->mem.cur_balloon =3D newmem; @@ -1741,7 +1741,7 @@ libxlDomainGetInfo(virDomainPtr dom, virDomainInfoPtr= info) =20 if (libxl_domain_info(cfg->ctx, &d_info, vm->def->id) !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxl_domain_info failed for domain '%d'"), + _("libxl_domain_info failed for domain '%1$d'"), vm->def->id); goto cleanup; } @@ -1805,15 +1805,15 @@ libxlDoDomainSave(libxlDriverPrivate *driver, =20 if (virDomainObjGetState(vm, NULL) =3D=3D VIR_DOMAIN_PAUSED) { virReportError(VIR_ERR_OPERATION_INVALID, - _("Domain '%d' has to be running because libxenligh= t will" - " suspend it"), vm->def->id); + _("Domain '%1$d' has to be running because libxenli= ght will suspend it"), + vm->def->id); goto cleanup; } =20 if ((fd =3D virFileOpenAs(to, O_CREAT|O_TRUNC|O_WRONLY, S_IRUSR|S_IWUS= R, -1, -1, 0)) < 0) { virReportSystemError(-fd, - _("Failed to create domain save file '%s'"), = to); + _("Failed to create domain save file '%1$s'")= , to); goto cleanup; } =20 @@ -1845,7 +1845,7 @@ libxlDoDomainSave(libxlDriverPrivate *driver, =20 if (ret !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to save domain '%d' with libxenlight"), + _("Failed to save domain '%1$d' with libxenlight"), vm->def->id); ret =3D -1; goto cleanup; @@ -1859,7 +1859,7 @@ libxlDoDomainSave(libxlDriverPrivate *driver, =20 if (libxlDomainDestroyInternal(driver, vm) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to destroy domain '%d'"), vm->def->id); + _("Failed to destroy domain '%1$d'"), vm->def->id); goto cleanup; } =20 @@ -2025,8 +2025,7 @@ libxlDomainCoreDump(virDomainPtr dom, const char *to,= unsigned int flags) virDomainObjGetState(vm, NULL) =3D=3D VIR_DOMAIN_RUNNING) { if (libxlDomainPauseWrapper(cfg->ctx, vm->def->id) !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Before dumping core, failed to suspend domai= n '%d'" - " with libxenlight"), + _("Before dumping core, failed to suspend domai= n '%1$d' with libxenlight"), vm->def->id); goto endjob; } @@ -2040,7 +2039,7 @@ libxlDomainCoreDump(virDomainPtr dom, const char *to,= unsigned int flags) virObjectLock(vm); if (ret !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to dump core of domain '%d' with libxenli= ght"), + _("Failed to dump core of domain '%1$d' with libxen= light"), vm->def->id); ret =3D -1; goto unpause; @@ -2049,7 +2048,7 @@ libxlDomainCoreDump(virDomainPtr dom, const char *to,= unsigned int flags) if (flags & VIR_DUMP_CRASH) { if (libxlDomainDestroyInternal(driver, vm) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to destroy domain '%d'"), vm->def->id= ); + _("Failed to destroy domain '%1$d'"), vm->def->= id); goto unpause; } =20 @@ -2068,8 +2067,8 @@ libxlDomainCoreDump(virDomainPtr dom, const char *to,= unsigned int flags) if (virDomainObjIsActive(vm) && paused) { if (libxlDomainUnpauseWrapper(cfg->ctx, vm->def->id) !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("After dumping core, failed to resume domain = '%d' with" - " libxenlight"), vm->def->id); + _("After dumping core, failed to resume domain = '%1$d' with libxenlight"), + vm->def->id); } else { virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, VIR_DOMAIN_RUNNING_UNPAUSED); @@ -2234,7 +2233,7 @@ libxlDomainSetVcpusFlags(virDomainPtr dom, unsigned i= nt nvcpus, (flags & (VIR_DOMAIN_VCPU_MAXIMUM | VIR_DOMAIN_VCPU_LIVE)) =3D=3D (VIR_DOMAIN_VCPU_MAXIMUM | VIR_DOMAIN_VCPU_LIVE)) { virReportError(VIR_ERR_INVALID_ARG, - _("invalid flag combination: (0x%x)"), flags); + _("invalid flag combination: (0x%1$x)"), flags); return -1; } =20 @@ -2275,8 +2274,8 @@ libxlDomainSetVcpusFlags(virDomainPtr dom, unsigned i= nt nvcpus, =20 if (nvcpus > max) { virReportError(VIR_ERR_INVALID_ARG, - _("requested vcpus is greater than max allowable" - " vcpus for the domain: %d > %d"), nvcpus, max); + _("requested vcpus is greater than max allowable vc= pus for the domain: %1$d > %2$d"), + nvcpus, max); goto endjob; } =20 @@ -2308,8 +2307,8 @@ libxlDomainSetVcpusFlags(virDomainPtr dom, unsigned i= nt nvcpus, case VIR_DOMAIN_VCPU_LIVE: if (libxlSetVcpuonlineWrapper(cfg->ctx, vm->def->id, &map) !=3D 0)= { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to set vcpus for domain '%d'" - " with libxenlight"), vm->def->id); + _("Failed to set vcpus for domain '%1$d' with l= ibxenlight"), + vm->def->id); goto endjob; } if (virDomainDefSetVcpus(vm->def, nvcpus) < 0) @@ -2319,8 +2318,8 @@ libxlDomainSetVcpusFlags(virDomainPtr dom, unsigned i= nt nvcpus, case VIR_DOMAIN_VCPU_LIVE | VIR_DOMAIN_VCPU_CONFIG: if (libxlSetVcpuonlineWrapper(cfg->ctx, vm->def->id, &map) !=3D 0)= { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to set vcpus for domain '%d'" - " with libxenlight"), vm->def->id); + _("Failed to set vcpus for domain '%1$d' with l= ibxenlight"), + vm->def->id); goto endjob; } if (virDomainDefSetVcpus(vm->def, nvcpus) < 0 || @@ -2388,7 +2387,7 @@ libxlDomainGetVcpusFlags(virDomainPtr dom, unsigned i= nt flags) } if ((flags & VIR_DOMAIN_VCPU_LIVE) && (flags & VIR_DOMAIN_VCPU_CONFIG)= ) { virReportError(VIR_ERR_INVALID_ARG, - _("invalid flag combination: (0x%x)"), flags); + _("invalid flag combination: (0x%1$x)"), flags); return -1; } =20 @@ -2464,7 +2463,7 @@ libxlDomainPinVcpuFlags(virDomainPtr dom, unsigned in= t vcpu, if (!(vcpuinfo =3D virDomainDefGetVcpu(targetDef, vcpu)) || !vcpuinfo->online) { virReportError(VIR_ERR_INVALID_ARG, - _("vcpu '%u' is not active"), vcpu); + _("vcpu '%1$u' is not active"), vcpu); goto endjob; } =20 @@ -2472,7 +2471,7 @@ libxlDomainPinVcpuFlags(virDomainPtr dom, unsigned in= t vcpu, libxl_bitmap map =3D { .size =3D maplen, .map =3D cpumap }; if (libxl_set_vcpuaffinity(cfg->ctx, vm->def->id, vcpu, &map, NULL= ) !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to pin vcpu '%d' with libxenlight"), + _("Failed to pin vcpu '%1$d' with libxenlight"), vcpu); goto endjob; } @@ -2571,7 +2570,7 @@ libxlDomainGetVcpus(virDomainPtr dom, virVcpuInfoPtr = info, int maxinfo, if ((vcpuinfo =3D libxl_list_vcpu(cfg->ctx, vm->def->id, &maxcpu, &hostcpus)) =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to list vcpus for domain '%d' with libxen= light"), + _("Failed to list vcpus for domain '%1$d' with libx= enlight"), vm->def->id); goto cleanup; } @@ -2676,7 +2675,7 @@ libxlConnectDomainXMLFromNative(virConnectPtr conn, goto cleanup; } else { virReportError(VIR_ERR_INVALID_ARG, - _("unsupported config type %s"), nativeFormat); + _("unsupported config type %1$s"), nativeFormat); goto cleanup; } =20 @@ -2719,7 +2718,7 @@ libxlConnectDomainXMLToNative(virConnectPtr conn, con= st char * nativeFormat, } else { =20 virReportError(VIR_ERR_INVALID_ARG, - _("unsupported config type %s"), nativeFormat); + _("unsupported config type %1$s"), nativeFormat); goto cleanup; } =20 @@ -2958,14 +2957,14 @@ libxlDomainChangeEjectableMedia(virDomainObj *vm, v= irDomainDiskDef *disk) =20 if (!origdisk) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("No device with bus '%s' and target '%s'"), + _("No device with bus '%1$s' and target '%2$s'"), virDomainDiskBusTypeToString(disk->bus), disk->dst); goto cleanup; } =20 if (origdisk->device !=3D VIR_DOMAIN_DISK_DEVICE_CDROM) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Removable media not supported for %s device"), + _("Removable media not supported for %1$s device"), virDomainDiskDeviceTypeToString(disk->device)); goto cleanup; } @@ -2975,7 +2974,7 @@ libxlDomainChangeEjectableMedia(virDomainObj *vm, vir= DomainDiskDef *disk) =20 if ((ret =3D libxl_cdrom_insert(cfg->ctx, vm->def->id, &x_disk, NULL))= < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight failed to change media for disk '%s'= "), + _("libxenlight failed to change media for disk '%1$= s'"), disk->dst); goto cleanup; } @@ -3010,7 +3009,7 @@ libxlDomainAttachDeviceDiskLive(virDomainObj *vm, vir= DomainDeviceDef *dev) if (l_disk->bus =3D=3D VIR_DOMAIN_DISK_BUS_XEN) { if (virDomainDiskIndexByName(vm->def, l_disk->dst, true) >= =3D 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("target %s already exists"), l_disk->= dst); + _("target %1$s already exists"), l_disk= ->dst); goto cleanup; } =20 @@ -3031,7 +3030,7 @@ libxlDomainAttachDeviceDiskLive(virDomainObj *vm, vir= DomainDeviceDef *dev) if ((ret =3D libxl_device_disk_add(cfg->ctx, vm->def->id, &x_disk, NULL)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight failed to attach disk '%= s'"), + _("libxenlight failed to attach disk '%= 1$s'"), l_disk->dst); if (virDomainLockImageDetach(libxl_driver->lockManager, vm, l_disk->src) < 0) { @@ -3046,7 +3045,7 @@ libxlDomainAttachDeviceDiskLive(virDomainObj *vm, vir= DomainDeviceDef *dev) =20 } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk bus '%s' cannot be hotplugged."), + _("disk bus '%1$s' cannot be hotplugged."), virDomainDiskBusTypeToString(l_disk->bus)); } break; @@ -3055,7 +3054,7 @@ libxlDomainAttachDeviceDiskLive(virDomainObj *vm, vir= DomainDeviceDef *dev) case VIR_DOMAIN_DISK_DEVICE_LAST: default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk device type '%s' cannot be hotplugged"), + _("disk device type '%1$s' cannot be hotplugged= "), virDomainDiskDeviceTypeToString(l_disk->device)= ); break; } @@ -3136,7 +3135,7 @@ libxlDomainAttachControllerDevice(libxlDriverPrivate = *driver, =20 if (controller->type !=3D VIR_DOMAIN_CONTROLLER_TYPE_USB) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("'%s' controller cannot be hot plugged."), + _("'%1$s' controller cannot be hot plugged."), type); goto cleanup; } @@ -3150,7 +3149,7 @@ libxlDomainAttachControllerDevice(libxlDriverPrivate = *driver, =20 if (virDomainControllerFind(vm->def, controller->type, controller->idx= ) >=3D 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("target %s:%d already exists"), + _("target %1$s:%2$d already exists"), type, controller->idx); goto cleanup; } @@ -3234,7 +3233,7 @@ libxlDomainAttachHostUSBDevice(libxlDriverPrivate *dr= iver, =20 if (libxl_device_usbdev_add(cfg->ctx, vm->def->id, &usbdev, 0) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight failed to attach usb device Busnum:%= 3x, Devnum:%3x"), + _("libxenlight failed to attach usb device Busnum:%= 1$3x, Devnum:%2$3x"), hostdev->source.subsys.u.usb.bus, hostdev->source.subsys.u.usb.device); goto reattach; @@ -3261,7 +3260,7 @@ libxlDomainAttachHostDevice(libxlDriverPrivate *drive= r, { if (hostdev->mode !=3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("hostdev mode '%s' not supported"), + _("hostdev mode '%1$s' not supported"), virDomainHostdevModeTypeToString(hostdev->mode)); return -1; } @@ -3279,7 +3278,7 @@ libxlDomainAttachHostDevice(libxlDriverPrivate *drive= r, =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("hostdev subsys type '%s' not supported"), + _("hostdev subsys type '%1$s' not supported"), virDomainHostdevSubsysTypeToString(hostdev->source.= subsys.type)); return -1; } @@ -3305,7 +3304,7 @@ libxlDomainDetachDeviceDiskLive(virDomainObj *vm, vir= DomainDeviceDef *dev) dev->data.disk->dst, false)) < 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("disk %s not found"), dev->data.disk-= >dst); + _("disk %1$s not found"), dev->data.dis= k->dst); goto cleanup; } =20 @@ -3317,7 +3316,7 @@ libxlDomainDetachDeviceDiskLive(virDomainObj *vm, vir= DomainDeviceDef *dev) if ((ret =3D libxl_device_disk_remove(cfg->ctx, vm->def->i= d, &x_disk, NULL)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight failed to detach disk '%= s'"), + _("libxenlight failed to detach disk '%= 1$s'"), l_disk->dst); goto cleanup; } @@ -3332,7 +3331,7 @@ libxlDomainDetachDeviceDiskLive(virDomainObj *vm, vir= DomainDeviceDef *dev) =20 } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk bus '%s' cannot be hot unplugged."), + _("disk bus '%1$s' cannot be hot unplugged.= "), virDomainDiskBusTypeToString(dev->data.disk= ->bus)); } break; @@ -3342,7 +3341,7 @@ libxlDomainDetachDeviceDiskLive(virDomainObj *vm, vir= DomainDeviceDef *dev) case VIR_DOMAIN_DISK_DEVICE_LAST: default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("device type '%s' cannot hot unplugged"), + _("device type '%1$s' cannot hot unplugged"), virDomainDiskDeviceTypeToString(dev->data.disk-= >device)); break; } @@ -3390,7 +3389,7 @@ libxlDomainAttachNetDevice(libxlDriverPrivate *driver, =20 if (virDomainHasNet(vm->def, net)) { virReportError(VIR_ERR_INVALID_ARG, - _("network device with mac %s already exists"), + _("network device with mac %1$s already exists"), virMacAddrFormat(&net->mac, mac)); goto cleanup; } @@ -3501,7 +3500,7 @@ libxlDomainAttachDeviceLive(libxlDriverPrivate *drive= r, case VIR_DOMAIN_DEVICE_AUDIO: case VIR_DOMAIN_DEVICE_CRYPTO: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("device type '%s' cannot be attached"), + _("device type '%1$s' cannot be attached"), virDomainDeviceTypeToString(dev->type)); break; } @@ -3524,7 +3523,7 @@ libxlDomainAttachDeviceConfig(virDomainDef *vmdef, vi= rDomainDeviceDef *dev) disk =3D dev->data.disk; if (virDomainDiskIndexByName(vmdef, disk->dst, true) >=3D 0) { virReportError(VIR_ERR_INVALID_ARG, - _("target %s already exists."), disk->dst); + _("target %1$s already exists."), disk->dst= ); return -1; } virDomainDiskInsert(vmdef, disk); @@ -3550,7 +3549,7 @@ libxlDomainAttachDeviceConfig(virDomainDef *vmdef, vi= rDomainDeviceDef *dev) net =3D dev->data.net; if (virDomainHasNet(vmdef, net)) { virReportError(VIR_ERR_INVALID_ARG, - _("network device with mac %s already exist= s"), + _("network device with mac %1$s already exi= sts"), virMacAddrFormat(&net->mac, mac)); return -1; } @@ -3721,7 +3720,7 @@ libxlDomainDetachControllerDevice(libxlDriverPrivate = *driver, =20 if (controller->type !=3D VIR_DOMAIN_CONTROLLER_TYPE_USB) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("'%s' controller cannot be hot plugged."), + _("'%1$s' controller cannot be hot plugged."), type); goto cleanup; } @@ -3730,7 +3729,7 @@ libxlDomainDetachControllerDevice(libxlDriverPrivate = *driver, controller->type, controller->idx)) < 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("controller %s:%d not found"), + _("controller %1$s:%2$d not found"), type, controller->idx); goto cleanup; } @@ -3779,7 +3778,7 @@ libxlDomainDetachHostUSBDevice(libxlDriverPrivate *dr= iver, idx =3D virDomainHostdevFind(vm->def, hostdev, &detach); if (idx < 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("host USB device Busnum: %3x, Devnum: %3x not fou= nd"), + _("host USB device Busnum: %1$3x, Devnum: %2$3x not= found"), usbsrc->bus, usbsrc->device); goto cleanup; } @@ -3797,15 +3796,14 @@ libxlDomainDetachHostUSBDevice(libxlDriverPrivate *= driver, =20 if (!found) { virReportError(VIR_ERR_OPERATION_FAILED, - _("host USB device Busnum: %3x, Devnum: %3x not fou= nd"), + _("host USB device Busnum: %1$3x, Devnum: %2$3x not= found"), usbsrc->bus, usbsrc->device); goto cleanup; } =20 if (libxl_device_usbdev_remove(cfg->ctx, vm->def->id, &usbdev, 0) < 0)= { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight failed to detach USB device " - "Busnum: %3x, Devnum: %3x"), + _("libxenlight failed to detach USB device Busnum: = %1$3x, Devnum: %2$3x"), usbsrc->bus, usbsrc->device); goto cleanup; } @@ -3833,7 +3831,7 @@ libxlDomainDetachHostDevice(libxlDriverPrivate *drive= r, =20 if (hostdev->mode !=3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("hostdev mode '%s' not supported"), + _("hostdev mode '%1$s' not supported"), virDomainHostdevModeTypeToString(hostdev->mode)); return -1; } @@ -3847,7 +3845,7 @@ libxlDomainDetachHostDevice(libxlDriverPrivate *drive= r, =20 default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected hostdev type %d"), subsys->type); + _("unexpected hostdev type %1$d"), subsys->type= ); break; } =20 @@ -3973,7 +3971,7 @@ libxlDomainDetachDeviceLive(libxlDriverPrivate *drive= r, case VIR_DOMAIN_DEVICE_AUDIO: case VIR_DOMAIN_DEVICE_CRYPTO: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("device type '%s' cannot be detached"), + _("device type '%1$s' cannot be detached"), virDomainDeviceTypeToString(dev->type)); break; } @@ -3999,7 +3997,7 @@ libxlDomainDetachDeviceConfig(virDomainDef *vmdef, vi= rDomainDeviceDef *dev) disk =3D dev->data.disk; if (!(detach =3D virDomainDiskRemoveByName(vmdef, disk->dst)))= { virReportError(VIR_ERR_INVALID_ARG, - _("no target device %s"), disk->dst); + _("no target device %1$s"), disk->dst); return -1; } virDomainDiskDefFree(detach); @@ -4091,7 +4089,7 @@ libxlDomainUpdateDeviceLive(virDomainObj *vm, virDoma= inDeviceDef *dev) case VIR_DOMAIN_DISK_DEVICE_LAST: default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk bus '%s' cannot be updated."), + _("disk bus '%1$s' cannot be updated."), virDomainDiskBusTypeToString(disk->bus)= ); break; } @@ -4125,7 +4123,7 @@ libxlDomainUpdateDeviceLive(virDomainObj *vm, virDoma= inDeviceDef *dev) case VIR_DOMAIN_DEVICE_AUDIO: case VIR_DOMAIN_DEVICE_CRYPTO: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("device type '%s' cannot be updated"), + _("device type '%1$s' cannot be updated"), virDomainDeviceTypeToString(dev->type)); break; } @@ -4144,7 +4142,7 @@ libxlDomainUpdateDeviceConfig(virDomainDef *vmdef, vi= rDomainDeviceDef *dev) disk =3D dev->data.disk; if (!(orig =3D virDomainDiskByTarget(vmdef, disk->dst))) { virReportError(VIR_ERR_INVALID_ARG, - _("target %s doesn't exist."), disk->dst); + _("target %1$s doesn't exist."), disk->dst); return -1; } if (!(orig->device =3D=3D VIR_DOMAIN_DISK_DEVICE_CDROM)) { @@ -4526,7 +4524,7 @@ libxlNodeGetCellsFreeMemory(virConnectPtr conn, /* Check/sanitize the cell range */ if (startCell >=3D nr_nodes) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("start cell %d out of range (0-%d)"), + _("start cell %1$d out of range (0-%2$d)"), startCell, nr_nodes - 1); goto cleanup; } @@ -4644,21 +4642,21 @@ libxlDomainSetAutostart(virDomainPtr dom, int autos= tart) if (autostart) { if (g_mkdir_with_parents(cfg->autostartDir, 0777) < 0) { virReportSystemError(errno, - _("cannot create autostart directory = %s"), + _("cannot create autostart directory = %1$s"), cfg->autostartDir); goto endjob; } =20 if (symlink(configFile, autostartLink) < 0) { virReportSystemError(errno, - _("Failed to create symlink '%s to '%= s'"), + _("Failed to create symlink '%1$s to = '%2$s'"), autostartLink, configFile); goto endjob; } } else { if (unlink(autostartLink) < 0 && errno !=3D ENOENT && errno != =3D ENOTDIR) { virReportSystemError(errno, - _("Failed to delete symlink '%s'"), + _("Failed to delete symlink '%1$s'"), autostartLink); goto endjob; } @@ -4719,8 +4717,8 @@ libxlDomainGetSchedulerType(virDomainPtr dom, int *np= arams) break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to get scheduler id for domain '%d'" - " with libxenlight"), vm->def->id); + _("Failed to get scheduler id for domain '%1$d' wit= h libxenlight"), + vm->def->id); goto cleanup; } =20 @@ -4769,8 +4767,8 @@ libxlDomainGetSchedulerParametersFlags(virDomainPtr d= om, =20 if (libxl_domain_sched_params_get(cfg->ctx, vm->def->id, &sc_info) != =3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to get scheduler parameters for domain '%= d'" - " with libxenlight"), vm->def->id); + _("Failed to get scheduler parameters for domain '%= 1$d' with libxenlight"), + vm->def->id); goto cleanup; } =20 @@ -4846,8 +4844,8 @@ libxlDomainSetSchedulerParametersFlags(virDomainPtr d= om, =20 if (libxl_domain_sched_params_get(cfg->ctx, vm->def->id, &sc_info) != =3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to get scheduler parameters for domain '%= d'" - " with libxenlight"), vm->def->id); + _("Failed to get scheduler parameters for domain '%= 1$d' with libxenlight"), + vm->def->id); goto endjob; } =20 @@ -4862,8 +4860,8 @@ libxlDomainSetSchedulerParametersFlags(virDomainPtr d= om, =20 if (libxl_domain_sched_params_set(cfg->ctx, vm->def->id, &sc_info) != =3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to set scheduler parameters for domain '%= d'" - " with libxenlight"), vm->def->id); + _("Failed to set scheduler parameters for domain '%= 1$d' with libxenlight"), + vm->def->id); goto endjob; } =20 @@ -4921,14 +4919,14 @@ libxlDomainOpenConsole(virDomainPtr dom, =20 if (!chr) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot find character device %s"), + _("cannot find character device %1$s"), NULLSTR(dev_name)); goto cleanup; } =20 if (chr->source->type !=3D VIR_DOMAIN_CHR_TYPE_PTY) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("character device %s is not using a PTY"), + _("character device %1$s is not using a PTY"), dev_name ? dev_name : NULLSTR(chr->info.alias)); goto cleanup; } @@ -5045,7 +5043,7 @@ libxlDomainGetNumaParameters(virDomainPtr dom, libxl_for_each_set_bit(j, nodemap) { if (virBitmapSetBit(nodes, j)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Node %zu out of range"), j); + _("Node %1$zu out of range"), j); goto cleanup; } } @@ -5187,7 +5185,7 @@ libxlDomainGetTotalCPUStats(libxlDriverPrivate *drive= r, =20 if (libxl_domain_info(cfg->ctx, &d_info, vm->def->id) !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxl_domain_info failed for domain '%d'"), + _("libxl_domain_info failed for domain '%1$d'"), vm->def->id); goto cleanup; } @@ -5227,7 +5225,7 @@ libxlDomainGetPerCPUStats(libxlDriverPrivate *driver, if ((vcpuinfo =3D libxl_list_vcpu(cfg->ctx, vm->def->id, &maxcpu, &hostcpus)) =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to list vcpus for domain '%d' with libxen= light"), + _("Failed to list vcpus for domain '%1$d' with libx= enlight"), vm->def->id); goto cleanup; } @@ -5322,7 +5320,7 @@ libxlDomainMemoryStats(virDomainPtr dom, =20 if (libxl_domain_info(cfg->ctx, &d_info, vm->def->id) !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxl_domain_info failed for domain '%d'"), + _("libxl_domain_info failed for domain '%1$d'"), vm->def->id); goto endjob; } @@ -5556,7 +5554,7 @@ libxlDomainBlockStatsVBD(virDomainObj *vm, if ((virFileReadAll(name, 256, &val) < 0) || \ (sscanf(val, "%llu", &status) !=3D 1)) { \ virReportError(VIR_ERR_OPERATION_FAILED, \ - _("cannot read %s"), name); \ + _("cannot read %1$s"), name); \ goto cleanup; \ } \ VAR +=3D (status * MUL); \ @@ -5605,7 +5603,7 @@ libxlDomainBlockStatsGatherSingle(virDomainObj *vm, =20 if (!(disk =3D virDomainDiskByName(vm->def, path, false))) { virReportError(VIR_ERR_OPERATION_INVALID, - _("invalid path: %s"), path); + _("invalid path: %1$s"), path); return ret; } =20 @@ -5616,7 +5614,7 @@ libxlDomainBlockStatsGatherSingle(virDomainObj *vm, if (STREQ(disk_drv, "phy")) { if (disk_fmt !=3D VIR_STORAGE_FILE_RAW) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("unsupported format %s"), + _("unsupported format %1$s"), virStorageFileFormatTypeToString(disk_fmt)); return ret; } @@ -5624,7 +5622,7 @@ libxlDomainBlockStatsGatherSingle(virDomainObj *vm, ret =3D libxlDomainBlockStatsVBD(vm, disk->dst, stats); } else { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("unsupported disk driver %s"), + _("unsupported disk driver %1$s"), disk_drv); } return ret; @@ -5847,7 +5845,7 @@ libxlConnectSupportsFeature(virConnectPtr conn, int f= eature) case VIR_DRV_FEATURE_NETWORK_UPDATE_HAS_CORRECT_ORDER: case VIR_DRV_FEATURE_FD_PASSING: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Global feature %d should have already been handl= ed"), + _("Global feature %1$d should have already been han= dled"), feature); return -1; case VIR_DRV_FEATURE_MIGRATION_V3: @@ -5880,7 +5878,7 @@ libxlNodeDeviceDetachFlags(virNodeDevicePtr dev, =20 if (STRNEQ(driverName, "xen")) { virReportError(VIR_ERR_INVALID_ARG, - _("unsupported driver name '%s'"), driverName); + _("unsupported driver name '%1$s'"), driverName); return -1; } =20 @@ -6164,8 +6162,7 @@ libxlDomainMigrateFinish3Params(virConnectPtr dconn, !(vm =3D virDomainObjListFindByName(driver->domains, dname))) { /* Migration obviously failed if the domain doesn't exist */ virReportError(VIR_ERR_OPERATION_FAILED, - _("Migration failed. No domain on destination host " - "with matching name '%s'"), + _("Migration failed. No domain on destination host = with matching name '%1$s'"), NULLSTR(dname)); return NULL; } @@ -6338,7 +6335,7 @@ libxlDomainInterfaceAddresses(virDomainPtr dom, =20 default: virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("Unsupported IP address data source %d"), + _("Unsupported IP address data source %1$d"), source); break; } @@ -6374,21 +6371,21 @@ libxlConnectGetDomainCapabilities(virConnectPtr con= n, if (virttype_str && (virttype =3D virDomainVirtTypeFromString(virttype_str)) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("unknown virttype: %s"), + _("unknown virttype: %1$s"), virttype_str); goto cleanup; } =20 if (virttype !=3D VIR_DOMAIN_VIRT_XEN) { virReportError(VIR_ERR_INVALID_ARG, - _("unknown virttype: %s"), + _("unknown virttype: %1$s"), virttype_str); goto cleanup; } =20 if (arch_str && (arch =3D virArchFromString(arch_str)) =3D=3D VIR_ARCH= _NONE) { virReportError(VIR_ERR_INVALID_ARG, - _("unknown architecture: %s"), + _("unknown architecture: %1$s"), arch_str); goto cleanup; } diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c index 0867194d9e..961815f9f7 100644 --- a/src/libxl/libxl_migration.c +++ b/src/libxl/libxl_migration.c @@ -471,7 +471,7 @@ libxlDomainMigrationPrepareAny(virConnectPtr dconn, =20 if ((*mig)->xenMigStreamVer > LIBXL_SAVE_VERSION) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("Xen migration stream version '%d' is not support= ed on this host"), + _("Xen migration stream version '%1$d' is not suppo= rted on this host"), (*mig)->xenMigStreamVer); return -1; } @@ -702,14 +702,14 @@ libxlDomainMigrationDstPrepare(virConnectPtr dconn, =20 if (uri =3D=3D NULL) { virReportError(VIR_ERR_INVALID_ARG, - _("unable to parse URI: %s"), + _("unable to parse URI: %1$s"), uri_in); goto endjob; } =20 if (uri->server =3D=3D NULL) { virReportError(VIR_ERR_INVALID_ARG, - _("missing host in migration URI: %s"), + _("missing host in migration URI: %1$s"), uri_in); goto endjob; } diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c index f61719adac..d5a0399613 100644 --- a/src/libxl/xen_common.c +++ b/src/libxl/xen_common.c @@ -59,7 +59,7 @@ xenConfigGetBool(virConf *conf, *value =3D STREQ(val->str, "1") ? 1 : 0; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("config value %s was malformed"), name); + _("config value %1$s was malformed"), name); return -1; } return 0; @@ -88,12 +88,12 @@ xenConfigGetULong(virConf *conf, } else if (val->type =3D=3D VIR_CONF_STRING) { if (virStrToLong_ul(val->str, NULL, 10, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("config value %s was malformed"), name); + _("config value %1$s was malformed"), name); return -1; } } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("config value %s was malformed"), name); + _("config value %1$s was malformed"), name); return -1; } return 0; @@ -122,12 +122,12 @@ xenConfigGetULongLong(virConf *conf, } else if (val->type =3D=3D VIR_CONF_STRING) { if (virStrToLong_ull(val->str, NULL, 10, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("config value %s was malformed"), name); + _("config value %1$s was malformed"), name); return -1; } } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("config value %s was malformed"), name); + _("config value %1$s was malformed"), name); return -1; } return 0; @@ -150,7 +150,7 @@ xenConfigCopyStringInternal(virConf *conf, if (allowMissing) return 0; virReportError(VIR_ERR_INTERNAL_ERROR, - _("config value %s was missing"), name); + _("config value %1$s was missing"), name); return -1; } =20 @@ -203,13 +203,13 @@ xenConfigGetUUID(virConf *conf, const char *name, uns= igned char *uuid) =20 if (!string) { virReportError(VIR_ERR_CONF_SYNTAX, - _("%s can't be empty"), name); + _("%1$s can't be empty"), name); return -1; } =20 if (virUUIDParse(string, uuid) < 0) { virReportError(VIR_ERR_CONF_SYNTAX, - _("%s not parseable"), string); + _("%1$s not parseable"), string); return -1; } =20 @@ -249,7 +249,7 @@ xenConfigSetInt(virConf *conf, const char *setting, lon= g long l) virConfValue *value =3D NULL; =20 if ((long)l !=3D l) { - virReportError(VIR_ERR_OVERFLOW, _("failed to store %lld to %s"), + virReportError(VIR_ERR_OVERFLOW, _("failed to store %1$lld to %2$s= "), l, setting); return -1; } @@ -340,7 +340,7 @@ xenParseEventsActions(virConf *conf, virDomainDef *def) =20 if ((def->onPoweroff =3D virDomainLifecycleActionTypeFromString(on_pow= eroff)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected value %s for on_poweroff"), on_powero= ff); + _("unexpected value %1$s for on_poweroff"), on_powe= roff); return -1; } =20 @@ -349,7 +349,7 @@ xenParseEventsActions(virConf *conf, virDomainDef *def) =20 if ((def->onReboot =3D virDomainLifecycleActionTypeFromString(on_reboo= t)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected value %s for on_reboot"), on_reboot); + _("unexpected value %1$s for on_reboot"), on_reboot= ); return -1; } =20 @@ -358,7 +358,7 @@ xenParseEventsActions(virConf *conf, virDomainDef *def) =20 if ((def->onCrash =3D virDomainLifecycleActionTypeFromString(on_crash)= ) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected value %s for on_crash"), on_crash); + _("unexpected value %1$s for on_crash"), on_crash); return -1; } =20 @@ -401,7 +401,7 @@ xenParsePCI(char *entry) str =3D tokens[nexttoken]; if (!(nextstr =3D strchr(str, '.'))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Malformed PCI address %s"), str); + _("Malformed PCI address %1$s"), str); return NULL; } *nextstr =3D '\0'; @@ -427,7 +427,7 @@ xenParsePCI(char *entry) =20 if (!(val =3D strchr(options[i], '=3D'))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Malformed PCI options %s"), str); + _("Malformed PCI options %1$s"), str); return NULL; } *val =3D '\0'; @@ -587,7 +587,7 @@ xenParseHypervisorFeatures(virConf *conf, virDomainDef = *def) def->xen_passthrough_mode =3D VIR_DOMAIN_XEN_PASSTHROUGH_MODE_= SHARE_PT; } else { virReportError(VIR_ERR_CONF_SYNTAX, - _("Invalid passthrough mode %s"), passthrough); + _("Invalid passthrough mode %1$s"), passthrough= ); } } =20 @@ -711,7 +711,7 @@ xenParseVfb(virConf *conf, virDomainDef *def) =20 if (virStrcpyStatic(vfb, *vfbs) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("VFB %s too big for destination"), + _("VFB %1$s too big for destination"), *vfbs); goto cleanup; } @@ -745,7 +745,7 @@ xenParseVfb(virConf *conf, virDomainDef *def) if (virStrToLong_i(key + 11, NULL, 10, &graphics->data.vnc.port) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid vncdisplay value '%s= '"), + _("invalid vncdisplay value '%1= $s'"), key + 11); goto cleanup; } @@ -826,7 +826,7 @@ xenParseSxprChar(const char *value, } else { if ((def->source->type =3D virDomainChrTypeFromString(prefix))= < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown chr device type '%s'"), prefix); + _("unknown chr device type '%1$s'"), prefix= ); goto error; } } @@ -1095,19 +1095,19 @@ xenParseSxprVifRate(const char *rate, unsigned long= long *kbytes_per_sec) regex =3D g_regex_new(vif_bytes_per_sec_re, 0, 0, &err); if (!regex) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to compile regex %s"), err->message); + _("Failed to compile regex %1$s"), err->message); return -1; } =20 if (!g_regex_match(regex, trate, 0, NULL)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid rate '%s' specified"), rate); + _("Invalid rate '%1$s' specified"), rate); return -1; } =20 if (virStrToLong_ull(rate, &suffix, 10, &tmp)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse rate '%s'"), rate); + _("Failed to parse rate '%1$s'"), rate); return -1; } =20 @@ -1178,7 +1178,7 @@ xenParseVif(char *entry, const char *vif_typename) if (mac) { if (virMacAddrParse(mac, &net->mac) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("malformed mac address '%s'"), mac); + _("malformed mac address '%1$s'"), mac); goto cleanup; } } @@ -1376,7 +1376,7 @@ xenParseGeneralMeta(virConf *conf, virDomainDef *def,= virCaps *caps) def->os.type =3D VIR_DOMAIN_OSTYPE_HVM; } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("type %s is not supported"), str); + _("type %1$s is not supported"), str); return -1; } } else { @@ -1439,7 +1439,7 @@ xenParseConfigCommon(virConf *conf, return -1; } else { virReportError(VIR_ERR_INVALID_ARG, - _("unsupported config type %s"), nativeFormat); + _("unsupported config type %1$s"), nativeFormat); return -1; } =20 @@ -1527,7 +1527,7 @@ xenFormatSxprChr(virDomainChrDef *def, =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported chr device type '%s'"), type); + _("unsupported chr device type '%1$s'"), type); return -1; } =20 @@ -1657,7 +1657,7 @@ xenFormatNet(virConnectPtr conn, virObjectUnref(network); if (!bridge) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network %s is not active"), + _("network %1$s is not active"), net->data.network.name); return -1; } @@ -1679,7 +1679,7 @@ xenFormatNet(virConnectPtr conn, case VIR_DOMAIN_NET_TYPE_VDPA: case VIR_DOMAIN_NET_TYPE_NULL: case VIR_DOMAIN_NET_TYPE_VDS: - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported net type= '%s'"), + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported net type= '%1$s'"), virDomainNetTypeToString(net->type)); return -1; =20 @@ -1859,7 +1859,7 @@ xenFormatTimeOffset(virConf *conf, virDomainDef *def) break; default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported clock offset=3D'%s'"), + _("unsupported clock offset=3D'%1$s'"), virDomainClockOffsetTypeToString(def->clock.off= set)); return -1; } @@ -1876,7 +1876,7 @@ xenFormatTimeOffset(virConf *conf, virDomainDef *def) break; default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported clock offset=3D'%s'"), + _("unsupported clock offset=3D'%1$s'"), virDomainClockOffsetTypeToString(def->clock.off= set)); return -1; } @@ -1896,7 +1896,7 @@ xenFormatEventActions(virConf *conf, virDomainDef *de= f) =20 if (!(lifecycle =3D virDomainLifecycleActionTypeToString(def->onPowero= ff))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected lifecycle action %d"), def->onPowerof= f); + _("unexpected lifecycle action %1$d"), def->onPower= off); return -1; } if (xenConfigSetString(conf, "on_poweroff", lifecycle) < 0) @@ -1905,7 +1905,7 @@ xenFormatEventActions(virConf *conf, virDomainDef *de= f) =20 if (!(lifecycle =3D virDomainLifecycleActionTypeToString(def->onReboot= ))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected lifecycle action %d"), def->onReboot); + _("unexpected lifecycle action %1$d"), def->onReboo= t); return -1; } if (xenConfigSetString(conf, "on_reboot", lifecycle) < 0) @@ -1914,7 +1914,7 @@ xenFormatEventActions(virConf *conf, virDomainDef *de= f) =20 if (!(lifecycle =3D virDomainLifecycleActionTypeToString(def->onCrash)= )) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected lifecycle action %d"), def->onCrash); + _("unexpected lifecycle action %1$d"), def->onCrash= ); return -1; } if (xenConfigSetString(conf, "on_crash", lifecycle) < 0) @@ -2122,7 +2122,7 @@ xenFormatHypervisorFeatures(virConf *conf, virDomainD= ef *def) return -1; } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported timer type (name) '%s'"), + _("unsupported timer type (name) '%1$s'"), virDomainTimerNameTypeToString(def->clock.t= imers[i]->name)); return -1; } @@ -2135,7 +2135,7 @@ xenFormatHypervisorFeatures(virConf *conf, virDomainD= ef *def) case VIR_DOMAIN_TIMER_NAME_PIT: case VIR_DOMAIN_TIMER_NAME_ARMVTIMER: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported timer type (name) '%s'"), + _("unsupported timer type (name) '%1$s'"), virDomainTimerNameTypeToString(def->clock.timer= s[i]->name)); return -1; =20 @@ -2284,7 +2284,7 @@ xenFormatSound(virConf *conf, virDomainDef *def) for (i =3D 0; i < def->nsounds; i++) { if (!(model =3D virDomainSoundModelTypeToString(def->sounds[i]->mo= del))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected sound model %d"), + _("unexpected sound model %1$d"), def->sounds[i]->model); return -1; } @@ -2368,7 +2368,7 @@ xenFormatConfigCommon(virConf *conf, return -1; } else { virReportError(VIR_ERR_INVALID_ARG, - _("unsupported config type %s"), nativeFormat); + _("unsupported config type %1$s"), nativeFormat); return -1; } =20 diff --git a/src/libxl/xen_xl.c b/src/libxl/xen_xl.c index cfd56b3b05..d5076f2438 100644 --- a/src/libxl/xen_xl.c +++ b/src/libxl/xen_xl.c @@ -274,7 +274,7 @@ xenParseXLCPUID(virConf *conf, virDomainDef *def) =20 if (STRNEQ(cpuid_pairs[0], "host")) { virReportError(VIR_ERR_CONF_SYNTAX, - _("cpuid starting with %s is not supported, only li= bxl format is"), + _("cpuid starting with %1$s is not supported, only = libxl format is"), cpuid_pairs[0]); return -1; } @@ -285,7 +285,7 @@ xenParseXLCPUID(virConf *conf, virDomainDef *def) return -1; if (!name_and_value[0] || !name_and_value[1]) { virReportError(VIR_ERR_CONF_SYNTAX, - _("Invalid libxl cpuid key=3Dvalue element: %s"= ), + _("Invalid libxl cpuid key=3Dvalue element: %1$= s"), cpuid_pairs[i]); return -1; } @@ -301,7 +301,7 @@ xenParseXLCPUID(virConf *conf, virDomainDef *def) policy =3D VIR_CPU_FEATURE_OPTIONAL; } else { virReportError(VIR_ERR_CONF_SYNTAX, - _("Invalid libxl cpuid value: %s"), + _("Invalid libxl cpuid value: %1$s"), cpuid_pairs[i]); return -1; } @@ -434,7 +434,7 @@ xenParseXLVnuma(virConf *conf, if (!str || !(data =3D strrchr(str, '=3D'))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("vnuma vnode invalid format '%s'"), + _("vnuma vnode invalid format '%1$s'"), str); return -1; } @@ -447,7 +447,7 @@ xenParseXLVnuma(virConf *conf, if ((virStrToLong_ui(data, NULL, 10, &cellid) < 0)= || (cellid >=3D nr_nodes)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("vnuma vnode %zu contains inv= alid pnode value '%s'"), + _("vnuma vnode %1$zu contains i= nvalid pnode value '%2$s'"), vnodeCnt, data); return -1; } @@ -477,7 +477,7 @@ xenParseXLVnuma(virConf *conf, =20 if (ndistances !=3D nr_nodes) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("vnuma pnode %d configured '%s' (= count %zu) doesn't fit the number of specified vnodes %zu"), + _("vnuma pnode %1$d configured '%2$= s' (count %3$zu) doesn't fit the number of specified vnodes %4$zu"), pnode, str, ndistances, nr_nodes); return -1; } @@ -493,7 +493,7 @@ xenParseXLVnuma(virConf *conf, =20 } else { virReportError(VIR_ERR_CONF_SYNTAX, - _("Invalid vnuma configuration for = vnode %zu"), + _("Invalid vnuma configuration for = vnode %1$zu"), vnodeCnt); return -1; } @@ -506,7 +506,7 @@ xenParseXLVnuma(virConf *conf, (cpumask =3D=3D NULL) || (kbsize =3D=3D 0)) { virReportError(VIR_ERR_CONF_SYNTAX, - _("Incomplete vnuma configuration for vnode %zu= "), + _("Incomplete vnuma configuration for vnode %1$= zu"), vnodeCnt); return -1; } @@ -520,7 +520,7 @@ xenParseXLVnuma(virConf *conf, =20 if (def->maxvcpus < vcpus) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("vnuma configuration contains %zu vcpus, which is= greater than %zu maxvcpus"), + _("vnuma configuration contains %1$zu vcpus, which = is greater than %2$zu maxvcpus"), vcpus, def->maxvcpus); return -1; } @@ -693,7 +693,7 @@ xenParseXLDisk(virConf *conf, virDomainDef *def) =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk image format not supported: %s"= ), + _("disk image format not supported: %1$= s"), libxl_disk_format_to_string(libxldisk.f= ormat)); goto fail; } @@ -720,7 +720,7 @@ xenParseXLDisk(virConf *conf, virDomainDef *def) #endif default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk backend not supported: %s"), + _("disk backend not supported: %1$s"), libxl_disk_backend_to_string(libxldisk.= backend)); goto fail; } @@ -770,7 +770,7 @@ xenParseXLInputDevs(virConf *conf, virDomainDef *def) while (val) { if (val->type !=3D VIR_CONF_STRING) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("config value %s was malformed"), + _("config value %1$s was malformed"), "usbdevice"); return -1; } @@ -1448,14 +1448,14 @@ xenFormatXLDiskSrcNet(virStorageSource *src) case VIR_STORAGE_NET_PROTOCOL_LAST: case VIR_STORAGE_NET_PROTOCOL_NONE: virReportError(VIR_ERR_NO_SUPPORT, - _("Unsupported network block protocol '%s'"), + _("Unsupported network block protocol '%1$s'"), virStorageNetProtocolTypeToString(src->protocol)); return NULL; =20 case VIR_STORAGE_NET_PROTOCOL_RBD: if (strchr(src->path, ':')) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("':' not allowed in RBD source volume name '%= s'"), + _("':' not allowed in RBD source volume name '%= 1$s'"), src->path); return NULL; } diff --git a/src/libxl/xen_xm.c b/src/libxl/xen_xm.c index 334de071ba..0031d6cbc6 100644 --- a/src/libxl/xen_xm.c +++ b/src/libxl/xen_xm.c @@ -186,7 +186,7 @@ xenParseXMDisk(char *entry, int hvm) VIR_FREE(driverType); if (virDomainDiskGetFormat(disk) <=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown driver type %s"), + _("Unknown driver type %1$s"), src); goto error; } @@ -297,7 +297,7 @@ xenFormatXMDisk(virConfValue *list, break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unsupported disk type %s"), + _("unsupported disk type %1$s"), virStorageTypeToString(virDomainDiskGetType= (disk))); return -1; } --=20 2.39.2