mirror of https://github.com/docker/docs.git
devmapper: Get rid of unused function HasActivatedDevice()
Looks like nobody is calling HasActivatedDevice(). Get rid of it. Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
parent
a3b04de401
commit
73f8b46d84
|
|
@ -1800,23 +1800,6 @@ func (devices *DeviceSet) HasDevice(hash string) bool {
|
||||||
return info != nil
|
return info != nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// HasActivatedDevice return true if the device exists.
|
|
||||||
func (devices *DeviceSet) HasActivatedDevice(hash string) bool {
|
|
||||||
info, _ := devices.lookupDevice(hash)
|
|
||||||
if info == nil {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
info.lock.Lock()
|
|
||||||
defer info.lock.Unlock()
|
|
||||||
|
|
||||||
devices.Lock()
|
|
||||||
defer devices.Unlock()
|
|
||||||
|
|
||||||
devinfo, _ := devicemapper.GetInfo(info.Name())
|
|
||||||
return devinfo != nil && devinfo.Exists != 0
|
|
||||||
}
|
|
||||||
|
|
||||||
// List returns a list of device ids.
|
// List returns a list of device ids.
|
||||||
func (devices *DeviceSet) List() []string {
|
func (devices *DeviceSet) List() []string {
|
||||||
devices.Lock()
|
devices.Lock()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue