summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Calavera <david.calavera@gmail.com>2016-04-14 12:21:47 -0700
committerDavid Calavera <david.calavera@gmail.com>2016-04-14 12:21:47 -0700
commit9e4b5e06f0618a9feca3ab07b1b4a6c6fde05409 (patch)
tree77c3dd2c36b435058011097fbe58d508cb213d57
parent6472a6d9e56bcbd32642d69bf91d3a2831b09e9c (diff)
parentd231260868507174d60ff58b18b14fa5bc2d5b66 (diff)
downloaddocker-9e4b5e06f0618a9feca3ab07b1b4a6c6fde05409.tar.gz
Merge pull request #22022 from AkihiroSuda/fixunused
Clean up unused code
-rw-r--r--container/container.go20
-rw-r--r--image/compat_unix.go13
-rw-r--r--image/compat_windows.go27
-rw-r--r--volume/local/local.go3
4 files changed, 1 insertions, 62 deletions
diff --git a/container/container.go b/container/container.go
index cae0eceee2..e658c4b4dd 100644
--- a/container/container.go
+++ b/container/container.go
@@ -523,26 +523,6 @@ func (container *Container) ShouldRestart() bool {
return shouldRestart
}
-// AddBindMountPoint adds a new bind mount point configuration to the container.
-func (container *Container) AddBindMountPoint(name, source, destination string, rw bool) {
- container.MountPoints[destination] = &volume.MountPoint{
- Name: name,
- Source: source,
- Destination: destination,
- RW: rw,
- }
-}
-
-// AddLocalMountPoint adds a new local mount point configuration to the container.
-func (container *Container) AddLocalMountPoint(name, destination string, rw bool) {
- container.MountPoints[destination] = &volume.MountPoint{
- Name: name,
- Driver: volume.DefaultDriverName,
- Destination: destination,
- RW: rw,
- }
-}
-
// AddMountPointWithVolume adds a new mount point configured with a volume to the container.
func (container *Container) AddMountPointWithVolume(destination string, vol volume.Volume, rw bool) {
container.MountPoints[destination] = &volume.MountPoint{
diff --git a/image/compat_unix.go b/image/compat_unix.go
deleted file mode 100644
index ba5d6a0937..0000000000
--- a/image/compat_unix.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// +build !windows
-
-package image
-
-func getOSVersion() string {
- // For Linux, images do not specify a version.
- return ""
-}
-
-func hasOSFeature(_ string) bool {
- // Linux currently has no OS features
- return false
-}
diff --git a/image/compat_windows.go b/image/compat_windows.go
deleted file mode 100644
index a8d488b0df..0000000000
--- a/image/compat_windows.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package image
-
-import (
- "fmt"
-
- "github.com/docker/docker/pkg/system"
-)
-
-// Windows OS features
-const (
- FeatureWin32k = "win32k" // The kernel windowing stack is required
-)
-
-func getOSVersion() string {
- v := system.GetOSVersion()
- return fmt.Sprintf("%d.%d.%d", v.MajorVersion, v.MinorVersion, v.Build)
-}
-
-func hasOSFeature(f string) bool {
- switch f {
- case FeatureWin32k:
- return system.HasWin32KSupport()
- default:
- // Unrecognized feature.
- return false
- }
-}
diff --git a/volume/local/local.go b/volume/local/local.go
index 0bca731a29..59a86329b7 100644
--- a/volume/local/local.go
+++ b/volume/local/local.go
@@ -258,8 +258,7 @@ func (r *Root) validateName(name string) error {
// localVolume implements the Volume interface from the volume package and
// represents the volumes created by Root.
type localVolume struct {
- m sync.Mutex
- usedCount int
+ m sync.Mutex
// unique name of the volume
name string
// path is the path on the host where the data lives