The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/7550

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From 6c2d0d039346d2e2b524e1b9bd207be182abe0a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Thu, 18 Jun 2020 11:54:54 -0400
Subject: [PATCH] lxd/resources/net: More flexible PCI detection
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
---
 lxd/resources/network.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/resources/network.go b/lxd/resources/network.go
index fb3d6a1a3c..3ab64405be 100644
--- a/lxd/resources/network.go
+++ b/lxd/resources/network.go
@@ -304,7 +304,7 @@ func GetNetwork() (*api.ResourcesNetwork, error) {
                                return nil, errors.Wrapf(err, "Failed to track 
down \"%s\"", devicePath)
                        }
 
-                       if strings.HasPrefix(linkTarget, "/sys/devices/pci") && 
sysfsExists(filepath.Join(devicePath, "subsystem")) {
+                       if strings.Contains(linkTarget, "/pci") && 
sysfsExists(filepath.Join(devicePath, "subsystem")) {
                                virtio := 
strings.HasPrefix(filepath.Base(linkTarget), "virtio")
                                if virtio {
                                        linkTarget = filepath.Dir(linkTarget)
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to