From patchwork Mon Oct 7 21:49:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 175427 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp4848479ill; Mon, 7 Oct 2019 14:52:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzg08j7y64fd08ZgrdCKdCj/nwcBkBR2syLX8VZnNM1J8J92Mus4nDNB4FA5PkVSymQ6vTR X-Received: by 2002:a92:1951:: with SMTP id e17mr32293718ilm.288.1570485172865; Mon, 07 Oct 2019 14:52:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570485172; cv=none; d=google.com; s=arc-20160816; b=xZyDuTWfhv3VfxZhD+TXdxSVBKP97BDQHKW8a1gjh9uOQYRvkNAe69HBIzpguFReL9 zWclBlW73dPMAuEZfIwjGnRtqIuE/aEmvwA2hMMWxqDUBy7QCwtizuLIrYcxv76XMOsS Ge3RtoP2oaHn0YUJBU9qVDXMjyQcwj2kBoVurJQ554tlqkCzWl9K9vVbITjekgTPbKS6 k2vP1ggFqxCUawbrPyjJLkHS30G6aJ9FR+JEG+FNWvwlAYmsfDSdOIaPH+weIGZ1Jma+ tEUz6ctZs6gGggsHyYVsWcDxJFoLjX38898PDAHJ629yydMC/44sewF/YqEbOxkdJIwe Dwkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :delivered-to; bh=Vwu9moFWTtO+soP8ymvgEbaCTf028eYT0ZfaF5Kr5+I=; b=hRAIGV2x/Z5zG3BLRTK9O9Msyk0ckHc1be6hF3R+tIFp/454EOmt9ZMdeRIN9TSJyS 1Wh/DpKc3fYB6UfLtSopSm6V3E47NRk9S/gDRcVVE4085HVLsmnvnJJrMMUi+3oLR3Ez Id2pgsb8L81yiO4x9QlvL9GQte5BPgaGigisOA18HLRgHDL85WPtxI9oVjyOEgYqr2Eh o97XfCPmaVRaZw+0p07TyqjANPFHkBhYgAb1Fu54mIZXtF6Q5mO89WhPm/4HQFSHlQjQ MboPfHI0em/bO0b22oYa7qDWHFeiGxR+RnWG0IJkxR8iosgaLwXAt9lZ8zP1iNp4h3Nl muGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id s129si18985818jas.108.2019.10.07.14.52.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Oct 2019 14:52:52 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 mx1.redhat.com (Postfix) with ESMTPS id 9AB5D8553B; Mon, 7 Oct 2019 21:52:51 +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 73F3360605; Mon, 7 Oct 2019 21:52:51 +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 334F31803518; Mon, 7 Oct 2019 21:52:51 +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 x97LnmXf014682 for ; Mon, 7 Oct 2019 17:49:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id BC63C5C224; Mon, 7 Oct 2019 21:49:48 +0000 (UTC) Delivered-To: libvir-list@redhat.com Received: from worklaptop.redhat.com (ovpn-123-156.rdu2.redhat.com [10.10.123.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0A55C5C223; Mon, 7 Oct 2019 21:49:44 +0000 (UTC) From: Cole Robinson To: libvir-list@redhat.com Date: Mon, 7 Oct 2019 17:49:29 -0400 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 Subject: [libvirt] [PATCH 15/30] storagefile: Fill in meta->externalDataStoreRaw 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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 07 Oct 2019 21:52:52 +0000 (UTC) Call qcow2GetExtensions to actually fill in the virStorageSource externalDataStoreRaw member Signed-off-by: Cole Robinson --- src/util/virstoragefile.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list Reviewed-by: Daniel Henrique Barboza diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 7e32d7619e..53fe4590b4 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -1060,6 +1060,12 @@ virStorageFileGetMetadataInternal(virStorageSourcePtr meta, fileTypeInfo[meta->format].getFeatures(&meta->features, meta->format, buf, len) < 0) return -1; + VIR_FREE(meta->externalDataStoreRaw); + if (meta->format == VIR_STORAGE_FILE_QCOW2 && + qcow2GetExtensions(buf, len, NULL, &meta->externalDataStoreRaw) < 0) { + return -1; + } + VIR_FREE(meta->compat); if (meta->format == VIR_STORAGE_FILE_QCOW2 && meta->features && VIR_STRDUP(meta->compat, "1.1") < 0)