Some were misleading or vague, some were plain wrong.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
| ... | ... |
@@ -95,7 +95,7 @@ func New(quiet bool, options ...Opt) *SysInfo {
|
| 95 | 95 |
return sysInfo |
| 96 | 96 |
} |
| 97 | 97 |
|
| 98 |
-// applyMemoryCgroupInfo reads the memory information from the memory cgroup mount point. |
|
| 98 |
+// applyMemoryCgroupInfo adds the memory cgroup controller information to the info. |
|
| 99 | 99 |
func applyMemoryCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
| 100 | 100 |
var warnings []string |
| 101 | 101 |
mountPoint, ok := cgMounts["memory"] |
| ... | ... |
@@ -133,7 +133,7 @@ func applyMemoryCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
| 133 | 133 |
return warnings |
| 134 | 134 |
} |
| 135 | 135 |
|
| 136 |
-// applyCPUCgroupInfo reads the cpu information from the cpu cgroup mount point. |
|
| 136 |
+// applyCPUCgroupInfo adds the cpu cgroup controller information to the info. |
|
| 137 | 137 |
func applyCPUCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
| 138 | 138 |
var warnings []string |
| 139 | 139 |
mountPoint, ok := cgMounts["cpu"] |
| ... | ... |
@@ -170,7 +170,7 @@ func applyCPUCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
| 170 | 170 |
return warnings |
| 171 | 171 |
} |
| 172 | 172 |
|
| 173 |
-// applyBlkioCgroupInfo reads the blkio information from the blkio cgroup mount point. |
|
| 173 |
+// applyBlkioCgroupInfo adds the blkio cgroup controller information to the info. |
|
| 174 | 174 |
func applyBlkioCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
| 175 | 175 |
var warnings []string |
| 176 | 176 |
mountPoint, ok := cgMounts["blkio"] |
| ... | ... |
@@ -211,7 +211,7 @@ func applyBlkioCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
| 211 | 211 |
return warnings |
| 212 | 212 |
} |
| 213 | 213 |
|
| 214 |
-// applyCPUSetCgroupInfo reads the cpuset information from the cpuset cgroup mount point. |
|
| 214 |
+// applyCPUSetCgroupInfo adds the cpuset cgroup controller information to the info. |
|
| 215 | 215 |
func applyCPUSetCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
| 216 | 216 |
var warnings []string |
| 217 | 217 |
mountPoint, ok := cgMounts["cpuset"] |
| ... | ... |
@@ -238,7 +238,7 @@ func applyCPUSetCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
| 238 | 238 |
return warnings |
| 239 | 239 |
} |
| 240 | 240 |
|
| 241 |
-// applyPIDSCgroupInfo reads the pids information from the pids cgroup mount point. |
|
| 241 |
+// applyPIDSCgroupInfo adds whether the pids cgroup controller is available to the info. |
|
| 242 | 242 |
func applyPIDSCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
| 243 | 243 |
var warnings []string |
| 244 | 244 |
_, ok := cgMounts["pids"] |
| ... | ... |
@@ -250,7 +250,7 @@ func applyPIDSCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
| 250 | 250 |
return warnings |
| 251 | 251 |
} |
| 252 | 252 |
|
| 253 |
-// applyDevicesCgroupInfo reads the pids information from the devices cgroup mount point. |
|
| 253 |
+// applyDevicesCgroupInfo adds whether the devices cgroup controller is available to the info. |
|
| 254 | 254 |
func applyDevicesCgroupInfo(info *SysInfo, cgMounts map[string]string) []string {
|
| 255 | 255 |
var warnings []string |
| 256 | 256 |
_, ok := cgMounts["devices"] |
| ... | ... |
@@ -267,7 +267,7 @@ func applyNetworkingInfo(info *SysInfo, _ map[string]string) []string {
|
| 267 | 267 |
return warnings |
| 268 | 268 |
} |
| 269 | 269 |
|
| 270 |
-// applyAppArmorInfo adds AppArmor information to the info. |
|
| 270 |
+// applyAppArmorInfo adds whether AppArmor is enabled to the info. |
|
| 271 | 271 |
func applyAppArmorInfo(info *SysInfo, _ map[string]string) []string {
|
| 272 | 272 |
var warnings []string |
| 273 | 273 |
if _, err := os.Stat("/sys/kernel/security/apparmor"); !os.IsNotExist(err) {
|
| ... | ... |
@@ -278,7 +278,7 @@ func applyAppArmorInfo(info *SysInfo, _ map[string]string) []string {
|
| 278 | 278 |
return warnings |
| 279 | 279 |
} |
| 280 | 280 |
|
| 281 |
-// applyCgroupNsInfo adds cgroup namespace information to the info. |
|
| 281 |
+// applyCgroupNsInfo adds whether cgroupns is enabled to the info. |
|
| 282 | 282 |
func applyCgroupNsInfo(info *SysInfo, _ map[string]string) []string {
|
| 283 | 283 |
var warnings []string |
| 284 | 284 |
if _, err := os.Stat("/proc/self/ns/cgroup"); !os.IsNotExist(err) {
|