From nobody Mon Feb 9 21:19:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1542741051085530.0060945886344; Tue, 20 Nov 2018 11:10:51 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D888D308FB99; Tue, 20 Nov 2018 19:10:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A483B601A6; Tue, 20 Nov 2018 19:10:48 +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 5A77B3F602; Tue, 20 Nov 2018 19:10:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wAKJAhNR006662 for ; Tue, 20 Nov 2018 14:10:43 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8F28560151; Tue, 20 Nov 2018 19:10:43 +0000 (UTC) Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 85145601A6 for ; Tue, 20 Nov 2018 19:10:38 +0000 (UTC) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 036872D7F9 for ; Tue, 20 Nov 2018 19:10:38 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id q26so3373087wmf.5 for ; Tue, 20 Nov 2018 11:10:37 -0800 (PST) Received: from rst.wireless.abdn.ac.uk (oa-edu-155-75.wireless.abdn.ac.uk. [137.50.155.75]) by smtp.gmail.com with ESMTPSA id j33sm10287770wre.91.2018.11.20.11.10.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Nov 2018 11:10:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7OW3UT7UsRR9YyFwAxwPxENWR197TN8hoi5NrpfFj8o=; b=p/N6VqZ6Suk/CDg+N1D78xuzFCNRSY4eJtL2eTb+ioXUDal+43nfgbt6qlmyuL+Jpz 50sqS0FewsGBqrhZDkwUJyZ52bBFvEgD+RkA4dD05P/xa0bmyspDwKEiGg0brhrix870 5t1MMOI8LVc7fw7zgjx3U/3uYxjSQblpYDeGRaRASHTvOnXHHS4PlxIyxZGe2kZ3yjsv Kx0GuT1Qea8Qi8rvphnw5P0i7k59RcsTF0vNL68jH1lGOX8/J3qzwfEUS60vNfkImfvd TLg+mOjfyUhv7EnCg0TFaDpAoBwr9NFi4nWnmNKfNI4CWQmG+9nxOU/1TNxStz+5IATx vs7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7OW3UT7UsRR9YyFwAxwPxENWR197TN8hoi5NrpfFj8o=; b=Iu2dC64JbEO/Argqw0Yp7YN2z19VBd2ypf0JTS5FKpEm26N8UR/Sr0QExSi5GfPfOH qTJ7yzKRLQGFPUD3hnz3jcxuF30mLlHSqhn5Qhn+m5H9U4dAt+pCUqmoGi7REeT1/TDr +/WeSQLIbgOb4V9cSjRGRgYtr1EWdW2eD93NfdYf7y7zwZPVAADL1tIJpHvRpuQtNOlD 5O57c31oviCx0XO+I7VdOJiQ5UAPQg/QR5nuV2/VLNiPHOl784UMOViJFtfslmoXU8MS 0XroqG0U7QcGH8ldWd3WWTgyTw/jHL/WkogycNUMM+H7sEJvLsShxOIs75R0tV3UvI1U 8Lnw== X-Gm-Message-State: AA+aEWbNCA6YrTz2TNClQI/L+t8bDdpsfk3mhGJ5UqM+fiotBcPpF8mE VnblaY1CNI3w6B0nwqhpEBnEFVMT X-Google-Smtp-Source: AJdET5eNTesBaa+5rUUDYtriZtAhDryfKDPVTT+H6uQCOyNHiD2vGk53orjIlO4KTuiB9+1bHzyUvQ== X-Received: by 2002:a1c:a05:: with SMTP id 5mr3124392wmk.49.1542741036281; Tue, 20 Nov 2018 11:10:36 -0800 (PST) From: Radostin Stoyanov To: libvir-list@redhat.com Date: Tue, 20 Nov 2018 19:10:20 +0000 Message-Id: <20181120191020.13564-3-rstoyanov1@gmail.com> In-Reply-To: <20181120191020.13564-1-rstoyanov1@gmail.com> References: <20181120191020.13564-1-rstoyanov1@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 20 Nov 2018 19:10:38 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 20 Nov 2018 19:10:38 +0000 (UTC) for IP:'209.85.128.66' DOMAIN:'mail-wm1-f66.google.com' HELO:'mail-wm1-f66.google.com' FROM:'rstoyanov1@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.139 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.128.66 mail-wm1-f66.google.com 209.85.128.66 mail-wm1-f66.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.30 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Radostin Stoyanov Subject: [libvirt] [sandbox PATCH 2/2] Use "/boot/vmlinuz-linux" as default kernel path 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 20 Nov 2018 19:10:49 +0000 (UTC) X-ZohoMail-DKIM: fail (Computed bodyhash is different from the expected one) Content-Type: text/plain; charset="utf-8" On some linux distributions "/boot/vmlinuz-linux" is set as default kernel path. If this file does not exist we fallback to the value "/boot/vmlinuz-$KERNEL-VERSION" Signed-off-by: Radostin Stoyanov --- bin/virt-sandbox.c | 5 +++-- libvirt-sandbox/libvirt-sandbox-builder-machine.c | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/virt-sandbox.c b/bin/virt-sandbox.c index 6032562..930b85e 100644 --- a/bin/virt-sandbox.c +++ b/bin/virt-sandbox.c @@ -553,8 +553,9 @@ omitted, defaults to match the current running host ver= sion. =20 =3Ditem B<--kernpath=3DFILE-PATH> =20 -Specify the path to the kernel binary. If omitted, defaults -to C. +Specify the path to the kernel binary. If omitted, defaults to +C if exists, otherwise +C will be used. =20 =3Ditem B<--kmodpath=3DDIR-PATH> =20 diff --git a/libvirt-sandbox/libvirt-sandbox-builder-machine.c b/libvirt-sa= ndbox/libvirt-sandbox-builder-machine.c index a4a5dcd..2c305a7 100644 --- a/libvirt-sandbox/libvirt-sandbox-builder-machine.c +++ b/libvirt-sandbox/libvirt-sandbox-builder-machine.c @@ -133,11 +133,15 @@ static gchar *gvir_sandbox_builder_machine_get_kernre= lease(GVirSandboxConfig *co static gchar *gvir_sandbox_builder_machine_get_kernpath(GVirSandboxConfig = *config) { const gchar *kernpath =3D gvir_sandbox_config_get_kernpath(config); + const gchar *default_kernpath =3D "/boot/vmlinuz-linux"; gchar *kver; gchar *ret; if (kernpath) return g_strdup(kernpath); =20 + if (access(default_kernpath, F_OK ) !=3D -1) + return g_strdup(default_kernpath); + kver =3D gvir_sandbox_builder_machine_get_kernrelease(config); ret =3D g_strdup_printf("/boot/vmlinuz-%s", kver); g_free(kver); --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list