From e599ef430ab58e7bd6a86125a1a50d680fe10ba2 Mon Sep 17 00:00:00 2001 From: Wei Zhang Date: Thu, 30 Aug 2018 23:11:56 +0800 Subject: [PATCH] device: don't persist `ContainerPath` of `DeviceInfo` Fixes #635 `ContainerPath` isn't meaningful in sandbox's `devices.json`, because device is sandbox level which can be referenced by many containers, and `ContainerPath` is per container which means nothing to a sandbox level resource. Signed-off-by: Wei Zhang --- virtcontainers/device/config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtcontainers/device/config/config.go b/virtcontainers/device/config/config.go index 66de00cfc6..0bfb79b571 100644 --- a/virtcontainers/device/config/config.go +++ b/virtcontainers/device/config/config.go @@ -53,7 +53,7 @@ type DeviceInfo struct { HostPath string // ContainerPath is device path inside container - ContainerPath string + ContainerPath string `json:"-"` // Type of device: c, b, u or p // c , u - character(unbuffered)