Lines Matching refs:ex
154 struct ggd_export *ex;
217 ex = malloc(sizeof(*ex));
218 if (ex == NULL)
220 ex->e_path = strdup(path);
221 if (ex->e_path == NULL)
225 ex->e_ip = (ip & mask);
226 ex->e_mask = mask;
227 ex->e_flags = flags;
229 SLIST_INSERT_HEAD(&exports, ex, e_next);
232 ip2str(ex->e_ip), vmask, path, sflags);
238 struct ggd_export *ex;
241 ex = SLIST_FIRST(&exports);
243 free(ex);
307 exports_check(struct ggd_export *ex, struct g_gate_cinit *cinit,
313 strlcpy(ipmask, ip2str(ex->e_ip), sizeof(ipmask));
315 strlcat(ipmask, ip2str(ex->e_mask), sizeof(ipmask));
317 if (ex->e_flags == O_WRONLY) {
319 "but %s (%s) is exported write-only.", ex->e_path,
326 if (ex->e_flags == O_RDONLY) {
328 "but %s (%s) is exported read-only.", ex->e_path,
335 if (ex->e_flags == O_RDONLY) {
337 "but %s (%s) is exported read-only.", ex->e_path,
340 } else if (ex->e_flags == O_WRONLY) {
342 "but %s (%s) is exported write-only.", ex->e_path,
354 if (strcmp(conn->c_path, ex->e_path) != 0) {
357 conn->c_path, ex->e_path);
363 conn->c_diskfd = open(ex->e_path, flags);
366 g_gate_log(LOG_ERR, "Cannot open %s: %s.", ex->e_path,
377 struct ggd_export *ex;
382 SLIST_FOREACH(ex, &exports, e_next) {
383 if ((ip & ex->e_mask) != ex->e_ip) {
385 ex->e_path);
388 if (strcmp(cinit->gc_path, ex->e_path) != 0) {
390 ex->e_path);
393 error = exports_check(ex, cinit, conn);
395 return (ex);
855 struct ggd_export *ex;
925 ex = exports_find(from, &cinit, conn);
926 if (ex == NULL) {