From nobody Wed Nov 5 11:01:11 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1540294117112327.3121526922855; Tue, 23 Oct 2018 04:28:37 -0700 (PDT) Received: from localhost ([::1]:40296 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEurS-0005pt-Gx for importer@patchew.org; Tue, 23 Oct 2018 07:28:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEumk-0001qo-JF for qemu-devel@nongnu.org; Tue, 23 Oct 2018 07:23:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEumg-0007iP-6W for qemu-devel@nongnu.org; Tue, 23 Oct 2018 07:23:42 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:36636) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gEumf-0007dP-HL for qemu-devel@nongnu.org; Tue, 23 Oct 2018 07:23:38 -0400 Received: by mail-wr1-f68.google.com with SMTP id y16so1273816wrw.3 for ; Tue, 23 Oct 2018 04:23:34 -0700 (PDT) Received: from localhost.localdomain (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id g8-v6sm1498990wmf.45.2018.10.23.04.23.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Oct 2018 04:23:32 -0700 (PDT) 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:mime-version:content-transfer-encoding; bh=QIRqdDEDCjzpcTJi3DEmJq4V6AN/2TLbW5wfi/ynF0U=; b=K0Ef9aW514++Y9f+XTN8Fo+EYGNoQPUhBApjqLqkiY9dTsVoimQ0SsjYv204UPxM6C FEC/nNcXs0qVJYPisKUvpzsJEO0ShuglguyyElLR96ZvI1f0jloJGuTlfZ0w7malsIrs e3HbyHuBtK24yxkqUhoiku+bWwMJnqIgdGiVr/GBKOJ4RDOhrHkM9/wFcEzo/ogy2f/W T6KFIAe7DyYukKlz+vA1ZP3IfE7xcOXfcwpE1S/vXpj1+wb9mK3ocWOZiebv+uel/k9J Oee4ejk/tu494KrQkw0121ONJa3qiV0YQp5wkUFM0my/w8Pht1ZaxkEYUA5+Mf5fU2MQ fu7w== X-Gm-Message-State: ABuFfojKJpxJtyFmWikBtSVOL/Qjc+WNeKRxY4MDLNyCCDJAil5VHsqz QhisohrhnDZF43NHFoG8VDMwVu2ZgsU= X-Google-Smtp-Source: ACcGV62/tga+NdoT8Fh+MHPxO4Kxu7JIDtAoqH8fmfwHmK/uFxUOqEfnUi8xxTFFHvpiEIhg8pNGsA== X-Received: by 2002:a5d:48cc:: with SMTP id p12-v6mr37403654wrs.122.1540293813500; Tue, 23 Oct 2018 04:23:33 -0700 (PDT) From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Golembiovsk=C3=BD?= To: qemu-devel@nongnu.org Date: Tue, 23 Oct 2018 13:23:15 +0200 Message-Id: <549ee1b2bd426c958e09aff0cec73443880c1348.1540293795.git.tgolembi@redhat.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.221.68 Subject: [Qemu-devel] [PATCH v5 06/14] *additonal fixup for NULL pci_controller field X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Roth , Olga Krishtal , =?UTF-8?q?Tom=C3=A1=C5=A1=20Golembiovsk=C3=BD?= , Sameeh Jubran , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 From: Michael Roth (cherry picked from commit 51fe925a7b473c76e06b60ddb8a862c91901b290) Signed-off-by: Michael Roth Signed-off-by: Tom=C3=A1=C5=A1 Golembiovsk=C3=BD --- qga/commands-win32.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index a8967abf06..44b6b1ce88 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -627,6 +627,10 @@ static GuestDiskAddressList *build_guest_disk_info(cha= r *guid, Error **errp) =20 disk =3D g_malloc0(sizeof(*disk)); disk->bus_type =3D find_bus_type(bus); + /* always set pci_controller as required by schema. get_pci_info() sho= uld + * report -1 values for non-PCI buses rather than fail. + */ + disk->pci_controller =3D get_pci_info(name, errp); if (bus =3D=3D BusTypeScsi || bus =3D=3D BusTypeAta || bus =3D=3D BusT= ypeRAID #if (_WIN32_WINNT >=3D 0x0600) /* This bus type is not supported before Windows Server 2003 S= P1 */ @@ -641,12 +645,9 @@ static GuestDiskAddressList *build_guest_disk_info(cha= r *guid, Error **errp) disk->unit =3D addr.Lun; disk->target =3D addr.TargetId; disk->bus =3D addr.PathId; - disk->pci_controller =3D get_pci_info(name, errp); } /* We do not set error in this case, because we still have enough * information about volume. */ - } else { - disk->pci_controller =3D NULL; } =20 list =3D g_malloc0(sizeof(*list)); --=20 2.19.0