X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmountd%2Fcache.c;h=fa154725b95b809dfe88c9a727fd98e4e1160e8b;hp=3a50c2647edd63a282e170957e3a1eb11315fb5f;hb=3a340251597a5b0c579c31d8caf9aa3b53a77016;hpb=7a817c45eaeb6aa93fdb5ca4d81c363b4e4218f0 diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c index 3a50c26..fa15472 100644 --- a/utils/mountd/cache.c +++ b/utils/mountd/cache.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -158,13 +159,50 @@ void auth_unix_gid(FILE *f) qword_printint(f, ngroups); for (i=0; im_export.e_uuid) get_uuid(NULL, exp->m_export.e_uuid, uuidlen, u); - else if (get_uuid(path, NULL, - uuidlen, u) == 0) + else if (get_uuid(path, NULL, uuidlen, u) == 0) continue; if (memcmp(u, fhuuid, uuidlen) != 0) continue; break; -#else - continue; -#endif } if (use_ipaddr) { if (he == NULL) { @@ -584,7 +600,6 @@ static int dump_to_cache(FILE *f, char *domain, char *path, struct exportent *ex qword_printint(f, exp->e_fsid); write_fsloc(f, exp, path); write_secinfo(f, exp); -#if USE_BLKID if (exp->e_uuid == NULL || different_fs) { char u[16]; if (get_uuid(path, NULL, 16, u)) { @@ -592,10 +607,11 @@ static int dump_to_cache(FILE *f, char *domain, char *path, struct exportent *ex qword_printhex(f, u, 16); } } else { + char u[16]; + get_uuid(NULL, exp->e_uuid, 16, u); qword_print(f, "uuid"); - qword_printhex(f, exp->e_uuid, 16); + qword_printhex(f, u, 16); } -#endif } return qword_eol(f); }