func deviceNumberString(number int64) string {
	if number == Wildcard {
		return "*"
	}
	return fmt.Sprint(number)
}
deviceNumberString converts the device number to a string return result.
package configs
import (
	"fmt"
	"os"
)
const (
	Wildcard = -1
)
type Device struct {
	Type rune `json:"type"`
	Path string `json:"path"`
	Major int64 `json:"major"`
	Minor int64 `json:"minor"`
	Permissions string `json:"permissions"`
	FileMode os.FileMode `json:"file_mode"`
	Uid uint32 `json:"uid"`
	Gid uint32 `json:"gid"`
	Allow bool `json:"allow"`
}
func (d *Device) CgroupString() string {
	return fmt.Sprintf("%c %s:%s %s", d.Type, deviceNumberString(d.Major), deviceNumberString(d.Minor), d.Permissions)
}
func (d *Device) Mkdev() int {
	return int((d.Major << 8) | (d.Minor & 0xff) | ((d.Minor & 0xfff00) << 12))
}