| 234 | }; |
| 235 | |
| 236 | std::vector<MountInfo> getMountInfo(const std::string& path = "/proc/self/mountinfo") { |
| 237 | std::ifstream mi(path); |
| 238 | std::vector<MountInfo> mounts; |
| 239 | std::string line; |
| 240 | if (!mi.is_open()) |
| 241 | return mounts; |
| 242 | while (std::getline(mi, line)) { |
| 243 | MountInfo mountInfo(line); |
| 244 | mounts.emplace_back(std::move(mountInfo)); |
| 245 | } |
| 246 | mi.close(); |
| 247 | return mounts; |
| 248 | } |
no outgoing calls
no test coverage detected