mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-22 20:39:41 +00:00
When imported, the vc files carried in the 'full style' apache license text, but the standard for kata is to use SPDX style. Update the relevant files to SPDX. Fixes: #227 Signed-off-by: Graham whaley <graham.whaley@intel.com>
38 lines
705 B
Go
38 lines
705 B
Go
// Copyright (c) 2017 Intel Corporation
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
package virtcontainers
|
|
|
|
const (
|
|
blockDeviceSupport = 1 << iota
|
|
blockDeviceHotplugSupport
|
|
)
|
|
|
|
type capabilities struct {
|
|
flags uint
|
|
}
|
|
|
|
func (caps *capabilities) isBlockDeviceSupported() bool {
|
|
if caps.flags&blockDeviceSupport != 0 {
|
|
return true
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (caps *capabilities) setBlockDeviceSupport() {
|
|
caps.flags = caps.flags | blockDeviceSupport
|
|
}
|
|
|
|
func (caps *capabilities) isBlockDeviceHotplugSupported() bool {
|
|
if caps.flags&blockDeviceHotplugSupport != 0 {
|
|
return true
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (caps *capabilities) setBlockDeviceHotplugSupport() {
|
|
caps.flags |= blockDeviceHotplugSupport
|
|
}
|