From nobody Mon Feb 9 04:03:19 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1618587578; cv=none; d=zohomail.com; s=zohoarc; b=adIl7kxpBf3cHQYT0I7PenbQ2vUNL9Z+aLvL9IZH72GFdkew5VI/9yZog0DOJH/YO9hqOQCwt6NojcdW0b37xNAbHg4vq6L5rEcFCy4d63nj3u5eoIhp981HM+S7aXvglL7wAFFxZnWSRYyo0PudOqJ0THfgeZnfy0Rz4GGYtFE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618587578; 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=sOBEJ9may/yd/DDb2tnRBjrdU+U62aZP7Tuz+AVvX9E=; b=Dvq8aImN0GAzjm0+6trCLWPk4JKy5ymAHlpvsi4nPjimLyoIHIujXG7mnCRZutMrTMRWAZQXs4cGj6e4TFOch3A1vp6Faimx0qy/qNO0UaKq+rGZOgLbYyY2ZNocGExw8VjFxpW3xK1FEDAzD4wSXBKCwhrJ0TUPONaQGo1/fXE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 16185875788451017.549680673028; Fri, 16 Apr 2021 08:39:38 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-504-DubizrGFNgSm59QUgNcjhw-1; Fri, 16 Apr 2021 11:39:34 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 212008143F0; Fri, 16 Apr 2021 15:39:30 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0117260D11; Fri, 16 Apr 2021 15:39:30 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C2E591806D1A; Fri, 16 Apr 2021 15:39:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13GFZAX7009379 for ; Fri, 16 Apr 2021 11:35:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id 822795C3DF; Fri, 16 Apr 2021 15:35:10 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id DBA8E5C260 for ; Fri, 16 Apr 2021 15:35:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618587577; 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=sOBEJ9may/yd/DDb2tnRBjrdU+U62aZP7Tuz+AVvX9E=; b=OFr/wjMYxz7JMz2lJNKMCf45P9MYNlXmplHWG0VD4518cEZn9RP81hXekxzDbCOxb614+9 Hur2/gLpPB9eX18LaOzmELAirE5ZDqjheuAjKlJQuh0Ymyv+WiZJnCvuzUZDaTsvbZW5bT dzo81YIRpQr5fEJrK5Xgbj+0GS6MiOk= X-MC-Unique: DubizrGFNgSm59QUgNcjhw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 13/25] conf: Move disk target 'ioemu:' stripping to virDomainDiskDefPostParse Date: Fri, 16 Apr 2021 17:34:31 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Modifications of the data such as this one don't belong into the parser. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ce0931c160..2803055204 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -5367,6 +5367,16 @@ virDomainDiskDefPostParse(virDomainDiskDef *disk, const virDomainDef *def, virDomainXMLOption *xmlopt) { + if (disk->dst) { + char *newdst; + + /* Work around for compat with Xen driver in previous libvirt rele= ases */ + if ((newdst =3D g_strdup(STRSKIP(disk->dst, "ioemu:")))) { + g_free(disk->dst); + disk->dst =3D newdst; + } + } + if (disk->src->type =3D=3D VIR_STORAGE_TYPE_NETWORK && disk->src->protocol =3D=3D VIR_STORAGE_NET_PROTOCOL_ISCSI) { virDomainPostParseCheckISCSIPath(&disk->src->path); @@ -9345,12 +9355,6 @@ virDomainDiskDefParseXML(virDomainXMLOption *xmlopt, return NULL; removable =3D virXMLPropString(cur, "removable"); rotation_rate =3D virXMLPropString(cur, "rotation_rate"); - - /* HACK: Work around for compat with Xen - * driver in previous libvirt releases */ - if (target && - STRPREFIX(target, "ioemu:")) - memmove(target, target+6, strlen(target)-5); } else if (!domain_name && virXMLNodeNameEqual(cur, "backenddomain")) { domain_name =3D virXMLPropString(cur, "name"); --=20 2.30.2