diff options
Diffstat (limited to 'support/nfs')
-rw-r--r-- | support/nfs/exports.c | 6 | ||||
-rw-r--r-- | support/nfs/xlog.c | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/support/nfs/exports.c b/support/nfs/exports.c index d3160d3..d18667f 100644 --- a/support/nfs/exports.c +++ b/support/nfs/exports.c @@ -47,8 +47,6 @@ struct flav_info flav_map[] = { const int flav_map_size = sizeof(flav_map)/sizeof(flav_map[0]); -int export_errno; - static char *efname = NULL; static XFILE *efp = NULL; static int first; @@ -133,7 +131,6 @@ getexportent(int fromkernel, int fromexports) } if (ok < 0) { xlog(L_ERROR, "expected client(options...)"); - export_errno = EINVAL; return NULL; } first = 0; @@ -153,7 +150,6 @@ getexportent(int fromkernel, int fromexports) ok = getexport(exp, sizeof(exp)); if (ok < 0) { xlog(L_ERROR, "expected client(options...)"); - export_errno = EINVAL; return NULL; } } @@ -173,7 +169,6 @@ getexportent(int fromkernel, int fromexports) *opt++ = '\0'; if (!(sp = strchr(opt, ')')) || sp[1] != '\0') { syntaxerr("bad option list"); - export_errno = EINVAL; return NULL; } *sp = '\0'; @@ -590,7 +585,6 @@ parseopts(char *cp, struct exportent *ep, int warn, int *had_subtree_opt_ptr) flname, flline, opt); bad_option: free(opt); - export_errno = EINVAL; return -1; } } else if (strncmp(opt, "anongid=", 8) == 0) { diff --git a/support/nfs/xlog.c b/support/nfs/xlog.c index 6820346..83d07e1 100644 --- a/support/nfs/xlog.c +++ b/support/nfs/xlog.c @@ -38,6 +38,8 @@ static int logmask = 0; /* What will be logged */ static char log_name[256]; /* name of this program */ static int log_pid = -1; /* PID of this program */ +int export_errno = 0; + static void xlog_toggle(int sig); static struct xlog_debugfac debugnames[] = { { "general", D_GENERAL, }, @@ -190,6 +192,9 @@ xlog(int kind, const char* fmt, ...) { va_list args; + if (kind & (L_ERROR|D_GENERAL)) + export_errno = 1; + va_start(args, fmt); xlog_backend(kind, fmt, args); va_end(args); |