mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
pkg/sysinfo/sysinfo_linux.go: fix some comments
Some were misleading or vague, some were plain wrong. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
parent
f02a53d6b9
commit
d5da7e5330
1 changed files with 8 additions and 8 deletions
|
@ -95,7 +95,7 @@ func New(quiet bool, options ...Opt) *SysInfo {
|
||||||
return sysInfo
|
return sysInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
// applyMemoryCgroupInfo reads the memory information from the memory cgroup mount point.
|
// applyMemoryCgroupInfo adds the memory cgroup controller information to the info.
|
||||||
func applyMemoryCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
func applyMemoryCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
||||||
var warnings []string
|
var warnings []string
|
||||||
mountPoint, ok := cgMounts["memory"]
|
mountPoint, ok := cgMounts["memory"]
|
||||||
|
@ -133,7 +133,7 @@ func applyMemoryCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
||||||
return warnings
|
return warnings
|
||||||
}
|
}
|
||||||
|
|
||||||
// applyCPUCgroupInfo reads the cpu information from the cpu cgroup mount point.
|
// applyCPUCgroupInfo adds the cpu cgroup controller information to the info.
|
||||||
func applyCPUCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
func applyCPUCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
||||||
var warnings []string
|
var warnings []string
|
||||||
mountPoint, ok := cgMounts["cpu"]
|
mountPoint, ok := cgMounts["cpu"]
|
||||||
|
@ -170,7 +170,7 @@ func applyCPUCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
||||||
return warnings
|
return warnings
|
||||||
}
|
}
|
||||||
|
|
||||||
// applyBlkioCgroupInfo reads the blkio information from the blkio cgroup mount point.
|
// applyBlkioCgroupInfo adds the blkio cgroup controller information to the info.
|
||||||
func applyBlkioCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
func applyBlkioCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
||||||
var warnings []string
|
var warnings []string
|
||||||
mountPoint, ok := cgMounts["blkio"]
|
mountPoint, ok := cgMounts["blkio"]
|
||||||
|
@ -211,7 +211,7 @@ func applyBlkioCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
||||||
return warnings
|
return warnings
|
||||||
}
|
}
|
||||||
|
|
||||||
// applyCPUSetCgroupInfo reads the cpuset information from the cpuset cgroup mount point.
|
// applyCPUSetCgroupInfo adds the cpuset cgroup controller information to the info.
|
||||||
func applyCPUSetCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
func applyCPUSetCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
||||||
var warnings []string
|
var warnings []string
|
||||||
mountPoint, ok := cgMounts["cpuset"]
|
mountPoint, ok := cgMounts["cpuset"]
|
||||||
|
@ -238,7 +238,7 @@ func applyCPUSetCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
||||||
return warnings
|
return warnings
|
||||||
}
|
}
|
||||||
|
|
||||||
// applyPIDSCgroupInfo reads the pids information from the pids cgroup mount point.
|
// applyPIDSCgroupInfo adds whether the pids cgroup controller is available to the info.
|
||||||
func applyPIDSCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
func applyPIDSCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
||||||
var warnings []string
|
var warnings []string
|
||||||
_, ok := cgMounts["pids"]
|
_, ok := cgMounts["pids"]
|
||||||
|
@ -250,7 +250,7 @@ func applyPIDSCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
||||||
return warnings
|
return warnings
|
||||||
}
|
}
|
||||||
|
|
||||||
// applyDevicesCgroupInfo reads the pids information from the devices cgroup mount point.
|
// applyDevicesCgroupInfo adds whether the devices cgroup controller is available to the info.
|
||||||
func applyDevicesCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
func applyDevicesCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
||||||
var warnings []string
|
var warnings []string
|
||||||
_, ok := cgMounts["devices"]
|
_, ok := cgMounts["devices"]
|
||||||
|
@ -267,7 +267,7 @@ func applyNetworkingInfo(info *SysInfo, _ map[string]string) []string {
|
||||||
return warnings
|
return warnings
|
||||||
}
|
}
|
||||||
|
|
||||||
// applyAppArmorInfo adds AppArmor information to the info.
|
// applyAppArmorInfo adds whether AppArmor is enabled to the info.
|
||||||
func applyAppArmorInfo(info *SysInfo, _ map[string]string) []string {
|
func applyAppArmorInfo(info *SysInfo, _ map[string]string) []string {
|
||||||
var warnings []string
|
var warnings []string
|
||||||
if _, err := os.Stat("/sys/kernel/security/apparmor"); !os.IsNotExist(err) {
|
if _, err := os.Stat("/sys/kernel/security/apparmor"); !os.IsNotExist(err) {
|
||||||
|
@ -278,7 +278,7 @@ func applyAppArmorInfo(info *SysInfo, _ map[string]string) []string {
|
||||||
return warnings
|
return warnings
|
||||||
}
|
}
|
||||||
|
|
||||||
// applyCgroupNsInfo adds cgroup namespace information to the info.
|
// applyCgroupNsInfo adds whether cgroupns is enabled to the info.
|
||||||
func applyCgroupNsInfo(info *SysInfo, _ map[string]string) []string {
|
func applyCgroupNsInfo(info *SysInfo, _ map[string]string) []string {
|
||||||
var warnings []string
|
var warnings []string
|
||||||
if _, err := os.Stat("/proc/self/ns/cgroup"); !os.IsNotExist(err) {
|
if _, err := os.Stat("/proc/self/ns/cgroup"); !os.IsNotExist(err) {
|
||||||
|
|
Loading…
Reference in a new issue