From 056e5df9a6e3441b5cd069619c8b3eb07bd7b9a7 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Wed, 4 Sep 2013 11:44:11 +0200 Subject: [PATCH] Add DeviceSet interface This interface matches the device-mapper implementation (DeviceSetDM) but is free from any dependencies. This allows core docker code to refer to a DeviceSet without having an explicit dependency on the devmapper package. This is important, because the devmapper package has external dependencies which are not wanted in the docker client app, as it needs to run with minimal dependencies in the docker image. Upstream-commit: ac194fc696fb95045ee5b634d04a9f7093f45685 Component: engine --- components/engine/deviceset.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 components/engine/deviceset.go diff --git a/components/engine/deviceset.go b/components/engine/deviceset.go new file mode 100644 index 0000000000..01bdba411f --- /dev/null +++ b/components/engine/deviceset.go @@ -0,0 +1,11 @@ +package docker + +type DeviceSet interface { + AddDevice(hash, baseHash string) error + SetInitialized(hash string) error + DeactivateDevice(hash string) error + RemoveDevice(hash string) error + MountDevice(hash, path string) error + HasDevice(hash string) bool + HasInitializedDevice(hash string) bool +}