Lines Matching defs:ex
151 struct ggd_export *ex;
214 ex = malloc(sizeof(*ex));
215 if (ex == NULL)
217 ex->e_path = strdup(path);
218 if (ex->e_path == NULL)
222 ex->e_ip = (ip & mask);
223 ex->e_mask = mask;
224 ex->e_flags = flags;
226 SLIST_INSERT_HEAD(&exports, ex, e_next);
229 ip2str(ex->e_ip), vmask, path, sflags);
235 struct ggd_export *ex;
238 ex = SLIST_FIRST(&exports);
240 free(ex);
304 exports_check(struct ggd_export *ex, struct g_gate_cinit *cinit,
310 strlcpy(ipmask, ip2str(ex->e_ip), sizeof(ipmask));
312 strlcat(ipmask, ip2str(ex->e_mask), sizeof(ipmask));
314 if (ex->e_flags == O_WRONLY) {
316 "but %s (%s) is exported write-only.", ex->e_path,
323 if (ex->e_flags == O_RDONLY) {
325 "but %s (%s) is exported read-only.", ex->e_path,
332 if (ex->e_flags == O_RDONLY) {
334 "but %s (%s) is exported read-only.", ex->e_path,
337 } else if (ex->e_flags == O_WRONLY) {
339 "but %s (%s) is exported write-only.", ex->e_path,
350 conn->c_diskfd = open(ex->e_path, flags);
353 g_gate_log(LOG_ERR, "Cannot open %s: %s.", ex->e_path,
364 struct ggd_export *ex;
369 SLIST_FOREACH(ex, &exports, e_next) {
370 if ((ip & ex->e_mask) != ex->e_ip) {
372 ex->e_path);
375 if (strcmp(cinit->gc_path, ex->e_path) != 0) {
377 ex->e_path);
380 error = exports_check(ex, cinit, conn);
382 return (ex);
839 struct ggd_export *ex;
909 ex = exports_find(from, &cinit, conn);
910 if (ex == NULL) {