GetProcMounts retrieves mountinfo information from a processes' `/proc/ /mountinfo`.
(pid int)
| 181 | |
| 182 | // GetProcMounts retrieves mountinfo information from a processes' `/proc/<pid>/mountinfo`. |
| 183 | func GetProcMounts(pid int) ([]*MountInfo, error) { |
| 184 | data, err := readMountInfo(fmt.Sprintf("/proc/%d/mountinfo", pid)) |
| 185 | if err != nil { |
| 186 | return nil, err |
| 187 | } |
| 188 | return parseMountInfo(data) |
| 189 | } |
| 190 | |
| 191 | // GetMounts retrieves mountinfo information from `/proc/self/mountinfo`. |
| 192 | func (fs FS) GetMounts() ([]*MountInfo, error) { |
nothing calls this directly
no test coverage detected