X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fnfs%2Fexports.c;h=dbb2da03be8980363cc242e43215baaee079e6d9;hp=71420c825520bd856753584bdee3d650bb08f7b3;hb=0589851d086dae1d6b858d442367835591dd0107;hpb=c0e89b264fb01c5b4bb925b32d1b6b7764c44d4a diff --git a/support/nfs/exports.c b/support/nfs/exports.c index 71420c8..dbb2da0 100644 --- a/support/nfs/exports.c +++ b/support/nfs/exports.c @@ -98,6 +98,8 @@ getexportent(void) if (ok == 0) exp[0] = '\0'; if ((opt = strchr(exp, '(')) != NULL) { + if (opt == exp) + xlog(L_WARNING, "No host name given with %s %s, suggest *%s to avoid warning", ee.e_path, exp, exp); *opt++ = '\0'; if (!(sp = strchr(opt, ')')) || sp[1] != '\0') { syntaxerr("bad option list"); @@ -106,6 +108,8 @@ getexportent(void) *sp = '\0'; if (parseopts(opt, &ee) < 0) return NULL; + } else { + xlog(L_WARNING, "No options for %s %s: suggest %s() to avoid warning", ee.e_path, exp, exp); } if (strlen(exp) >= sizeof(ee.e_hostname)) { syntaxerr("client name too long"); @@ -394,8 +398,8 @@ parsesquash(char *list, int **idp, int *lenp, char **ep) cp++; } while(1); - if (*cp == ',') *ep = cp+1; - + if (**ep == ',') (*ep)++; + *lenp = len; *idp = id; return 1;