From 0c51da3dd0a04a25b8d923f72d99e2b1fff3bfb7 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Thu, 4 Nov 2021 16:47:45 +1100 Subject: [PATCH] agent/device: Correct misleading error message in update_spec_device() This error is returned if we have information for a device from the runtime, but a matching device does not appear in the OCI spec. However, the name for the device we print is the name from the VM, rather than the name from the container which is what we actually expect in the spec. Signed-off-by: David Gibson --- src/agent/src/device.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agent/src/device.rs b/src/agent/src/device.rs index e01b7d3df..fe79b4441 100644 --- a/src/agent/src/device.rs +++ b/src/agent/src/device.rs @@ -511,8 +511,8 @@ fn update_spec_device( Ok(()) } else { Err(anyhow!( - "Should have found a matching device {} in the spec", - vm_path + "Should have found a device {} in the spec", + host_path )) } }