From nobody Sat Feb 7 09:29:47 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) client-ip=63.128.21.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 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=1585131538; cv=none; d=zohomail.com; s=zohoarc; b=kYZyVQk4flOGHbhL2CijZYy8GgSFq4ibaGZG72Hh5cEBaDQoNh7fO3jMV/MCMr9krbAimAgP/OB8rxcb/u9R7peV3Jl9NWI3Dp8r30PUD8NKGmSQ5X9EDzFVxeFczkABJVAbKZpnb7j2F1Tz0b8wCdiuWjpuAgtTsIKEvwgHAoE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585131538; 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=Sd/bjz/DTkIoUJiAOdXn2nAnsJR7EYRO/mLDutEWBuA=; b=ED7KPWiD0y+Vjf+4QugKPR4i3vNaZnajf8x9DLo+Kq4KmGII5QqRV1ds572dH9Y6M2t4tXugtKNvsHbbGX0lpxUbtgg5m9ZWJE/ZfTHePud4d1QrD2QNkP81gSWh12RGHN/TDjjxqFFb+pnVZDliufvlnaH3Q9BAivA02gim+AY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 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-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by mx.zohomail.com with SMTPS id 1585131538220561.0055946828385; Wed, 25 Mar 2020 03:18:58 -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-78-VxLGPT1EMHaLmDoqX4-1HA-1; Wed, 25 Mar 2020 06:18:54 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 554B48014CD; Wed, 25 Mar 2020 10:18:49 +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 2BA7C1000322; Wed, 25 Mar 2020 10:18:49 +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 D5A5E18089D7; Wed, 25 Mar 2020 10:18:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02PAILiT000392 for ; Wed, 25 Mar 2020 06:18:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id 92B62A7EC; Wed, 25 Mar 2020 10:18:21 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.192.151]) by smtp.corp.redhat.com (Postfix) with ESMTP id 116B6194BB for ; Wed, 25 Mar 2020 10:18:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585131536; 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=Sd/bjz/DTkIoUJiAOdXn2nAnsJR7EYRO/mLDutEWBuA=; b=bOGH3WsFk25al98uaE1EchHf0NW4YH+QtNTet6nzu/bjyhC6MnW6ElMWFFi+hIYtKNh2nz 60m5FQCQ+tbQI0iKcnkfur+zdjqQXHvc6BcSd0JQYq+mOq000dBvBc3qEi8r0iE17NBLxz V8XyqPHQMTA79aumbzV/PlZ0zL+ffNs= X-MC-Unique: VxLGPT1EMHaLmDoqX4-1HA-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 6/9] Revert "qemu_conf: Track embed root dir" Date: Wed, 25 Mar 2020 11:18:06 +0100 Message-Id: <962e57eb8ecba665b680df679e4be08061c03687.1585130420.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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.84 on 10.5.11.22 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" This reverts commit 06a19921b6a522cd7b4d352c9320909752947de3. What I haven't realized when writing this ^^ commit is that the virQEMUDriver structure already stores the root directory path. And since the pointer is immutable it can be accessed right from the structure and thus there is no need to duplicate it in the driver config. Signed-off-by: Michal Privoznik Reviewed-by: Andrea Bolognani --- src/qemu/qemu_conf.c | 2 -- src/qemu/qemu_conf.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index fb7c5a1a8a..6eb655fe21 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -115,7 +115,6 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool priv= ileged, =20 if (root) { cfg->uri =3D g_strdup_printf("qemu:///embed?root=3D%s", root); - cfg->root =3D g_strdup(root); } else { cfg->uri =3D g_strdup(privileged ? "qemu:///system" : "qemu:///ses= sion"); } @@ -302,7 +301,6 @@ static void virQEMUDriverConfigDispose(void *obj) =20 virStringListFree(cfg->cgroupDeviceACL); VIR_FREE(cfg->uri); - VIR_FREE(cfg->root); =20 VIR_FREE(cfg->configBaseDir); VIR_FREE(cfg->configDir); diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index 77e984ccdc..0f0eb60c69 100644 --- a/src/qemu/qemu_conf.h +++ b/src/qemu/qemu_conf.h @@ -76,8 +76,6 @@ struct _virQEMUDriverConfig { virObject parent; =20 char *uri; - char *root; /* The root directory for embed driver, - NULL for system/session connections */ =20 uid_t user; gid_t group; --=20 2.24.1