From nobody Sun May 5 13:05:16 2024 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 1526045718084272.10970845981853; Fri, 11 May 2018 06:35:18 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BEF8330C54E8; Fri, 11 May 2018 13:35:13 +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 B7DF795A22; Fri, 11 May 2018 13:35:12 +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 73BA14BB79; Fri, 11 May 2018 13:35:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4B8Ys8o025066 for ; Fri, 11 May 2018 04:34:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id 611FF18352; Fri, 11 May 2018 08:34:54 +0000 (UTC) Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.42]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4E4E218350 for ; Fri, 11 May 2018 08:34:49 +0000 (UTC) Received: from mail-wr0-f172.google.com (mail-wr0-f172.google.com [209.85.128.172]) (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 411753003567 for ; Fri, 11 May 2018 08:34:38 +0000 (UTC) Received: by mail-wr0-f172.google.com with SMTP id y15-v6so4462942wrg.11 for ; Fri, 11 May 2018 01:34:38 -0700 (PDT) Received: from filip.wifi7.wifi.edu.sk ([193.87.160.237]) by smtp.googlemail.com with ESMTPSA id x63-v6sm809994wma.25.2018.05.11.01.34.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 May 2018 01:34:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=U6pS9DFZVJI4T12MoayN1jHInkbud/0wSBGNZ6ogfj0=; b=tPAkE2aDCw9y4uEYDoeO2hhgB5TN/Gu5nBDyahgh9bHBmtLHm+xNoMmLQjrqBsBS4L fWmYgQq/SAyDvlawKlxu4HtYXQ0kg2mM1gN1t7DFJQDW2Hv5t7LCihI9JpFeqRVVVgJr Y2Rqd4iq9cfl1DNPD2ZkwwihyAiPTmRakvz/ZP0qAAAPPgvUJhOL2bY0WtOo+9mvbEXb GYyN41MaxB8O1w82mNthcJdrVQBjZngkE0P+McFluzcvWszPBbM1Rb2wEXQ4Nb9RfkWx TaECAX8vEyLHCHvGmf27MYQ0yLee4xHUQsHWjlyRa7w7oI5+TMOTVFeEXVizfplPqDpq JlCA== 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; bh=U6pS9DFZVJI4T12MoayN1jHInkbud/0wSBGNZ6ogfj0=; b=saFgk6dr+FPQP1mrwz1b7rIBNu524eerFWojCkkHk4ACFMJQbM4ONlqmuIi74Fpju/ bs8Yrk/C9xDZ27QL0UHEQAwkSrQikFig6zT+UIagy3R2YxkpYb8qmsZFyQCizqAkIkl0 KbKsMa4obM3gvO2MNDWW8DegFH4fLtmMU5wZG7nWag1iolqUss4cb6KaqGgDX1NTfJdN hZ/6+2TMgRr4r4QOZRkX9olCAlNaAslL792L6rt7dEGhwHc8ME7+2eiT+ERBozTIp1A3 rEJeSmIYDKgsBDRvcnpNxFEXg3LNCNGicGa1j5DRN49SbytwmdvDSwbs1pKRC6lkJ6RL P1rA== X-Gm-Message-State: ALKqPweOXbZNPbWBBTWUDWIwQW/Ce18sEF2/EH+dodjojoy9Xju5zMJe Jm90oFC7dOFLFX6Y1WpkjCiTgA== X-Google-Smtp-Source: AB8JxZrYtj88lbsYYJHCVeMejx3E+tlth+6ydSm4VVpU8Zua5oSOS79OWGNJ0Hu5TfHZ1zvzcUlp1g== X-Received: by 2002:adf:df02:: with SMTP id y2-v6mr3863416wrl.92.1526027676658; Fri, 11 May 2018 01:34:36 -0700 (PDT) From: Filip Alac To: libvir-list@redhat.com Date: Fri, 11 May 2018 10:33:48 +0200 Message-Id: <20180511083348.4074-1-filipalac@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 11 May 2018 08:34:38 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 11 May 2018 08:34:38 +0000 (UTC) for IP:'209.85.128.172' DOMAIN:'mail-wr0-f172.google.com' HELO:'mail-wr0-f172.google.com' FROM:'filipalac@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.3 * (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS, T_DKIM_INVALID) 209.85.128.172 mail-wr0-f172.google.com 209.85.128.172 mail-wr0-f172.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.42 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com X-Mailman-Approved-At: Fri, 11 May 2018 09:33:31 -0400 Cc: Filip Alac Subject: [libvirt] [PATCH] xenconfig: xm: Fix checking for extra in parser 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.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Fri, 11 May 2018 13:35:14 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Parser assumed extra was always present when root was specified. Fixed by handling root and extra separately. --- src/xenconfig/xen_xm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/xenconfig/xen_xm.c b/src/xenconfig/xen_xm.c index 8ef68bbc..4becb40b 100644 --- a/src/xenconfig/xen_xm.c +++ b/src/xenconfig/xen_xm.c @@ -91,10 +91,13 @@ xenParseXMOS(virConfPtr conf, virDomainDefPtr def) if (xenConfigGetString(conf, "root", &root, NULL) < 0) return -1; =20 - if (root) { + if (root && extra) { if (virAsprintf(&def->os.cmdline, "root=3D%s %s", root, extra)= < 0) return -1; - } else { + } else if (root) { + if (virAsprintf(&def->os.cmdline, "root=3D%s", root) < 0) + return -1; + } else if (extra) { if (VIR_STRDUP(def->os.cmdline, extra) < 0) return -1; } --=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list