1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Server: Pass in device-mapper DeviceSet to server

This makes docker (but not docker-init) link to libdevmapper and will
allow it to use the DeviceSet
This commit is contained in:
Alexander Larsson 2013-09-04 12:03:45 +02:00 committed by Tianon Gravi
parent e6216793d9
commit 1d36b8c7b7
2 changed files with 3 additions and 2 deletions

View file

@ -4,6 +4,7 @@ import (
"flag" "flag"
"fmt" "fmt"
"github.com/dotcloud/docker" "github.com/dotcloud/docker"
"github.com/dotcloud/docker/devmapper"
"github.com/dotcloud/docker/utils" "github.com/dotcloud/docker/utils"
"io/ioutil" "io/ioutil"
"log" "log"
@ -133,7 +134,7 @@ func daemon(pidfile string, flGraphPath string, protoAddrs []string, autoRestart
if flDns != "" { if flDns != "" {
dns = []string{flDns} dns = []string{flDns}
} }
server, err := docker.NewServer(flGraphPath, autoRestart, enableCors, dns) server, err := docker.NewServer(flGraphPath, devmapper.NewDeviceSetDM(flGraphPath), autoRestart, enableCors, dns)
if err != nil { if err != nil {
return err return err
} }

View file

@ -1299,7 +1299,7 @@ func (srv *Server) ContainerCopy(name string, resource string, out io.Writer) er
} }
func NewServer(flGraphPath string, autoRestart, enableCors bool, dns ListOpts) (*Server, error) { func NewServer(flGraphPath string, deviceSet DeviceSet, autoRestart, enableCors bool, dns ListOpts) (*Server, error) {
if runtime.GOARCH != "amd64" { if runtime.GOARCH != "amd64" {
log.Fatalf("The docker runtime currently only supports amd64 (not %s). This will change in the future. Aborting.", runtime.GOARCH) log.Fatalf("The docker runtime currently only supports amd64 (not %s). This will change in the future. Aborting.", runtime.GOARCH)
} }