Lines Matching refs:netns_path
177 char netns_path[MAXPATHLEN]; in netns_delete() local
185 snprintf(netns_path, sizeof(netns_path), "%s/%s", NETNS_RUN_DIR, name); in netns_delete()
186 umount2(netns_path, MNT_DETACH); in netns_delete()
187 if (unlink(netns_path) < 0) { in netns_delete()
189 netns_path, strerror(errno)); in netns_delete()
205 char netns_path[MAXPATHLEN]; in netns_add() local
215 snprintf(netns_path, sizeof(netns_path), "%s/%s", NETNS_RUN_DIR, name); in netns_add()
221 fd = open(netns_path, O_RDONLY|O_CREAT|O_EXCL, 0); in netns_add()
224 netns_path, strerror(errno)); in netns_add()
235 if (mount("/proc/self/ns/net", netns_path, "none", MS_BIND, NULL) < 0) { in netns_add()
237 netns_path, strerror(errno)); in netns_add()