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

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) ===

From f7fd7215344bb0d5d31d04307a0ba5d17e9bf0fc Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.h...@canonical.com>
Date: Fri, 16 Oct 2020 08:37:26 +0200
Subject: [PATCH] lxd/device/usb: Fix check for required USB device

This fixes the check for required USB devices for VMs.

Signed-off-by: Thomas Hipp <thomas.h...@canonical.com>
---
 lxd/device/usb.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/device/usb.go b/lxd/device/usb.go
index b8d9fe7e07..4c6efea101 100644
--- a/lxd/device/usb.go
+++ b/lxd/device/usb.go
@@ -172,7 +172,7 @@ func (d *usb) startVM() (*deviceConfig.RunConfig, error) {
                }...)
        }
 
-       if d.isRequired() && len(runConf.Mounts) <= 0 {
+       if d.isRequired() && len(runConf.USBDevice) <= 0 {
                return nil, fmt.Errorf("Required USB device not found")
        }
 
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to