From 70a0e44cc77a7d8fc78c5514889bcd5d4fde3599 Mon Sep 17 00:00:00 2001 From: hjl Date: Thu, 1 Jun 2000 00:57:09 +0000 Subject: 2000-05-31 H.J. Lu * configure.in (VERSION): Set to "0.1.7.5". * configure: Regenerated. * nfs-utils.spec: Updated. * support/include/nfslib.h (exportent): Add a new field, r_count, to count the number of mounts from a client. (getrmtabent): Take a new argument for position in file. (putrmtabent): Likewise. (fgetrmtabent): Likewise. (fputrmtabent): Likewise. * support/nfs/rmtab.c (getrmtabent): Handle the new argument for position in file. (fgetrmtabent): Likewise. (putrmtabent): Likewise. (fputrmtabent): Likewise. * support/nfs/rmtab.c (fgetrmtabent): Get value for the new field, r_count. * support/export/rmtab.c (rmtab_read): Pass NULL as the new argument to getrmtabent (), fgetrmtabent (), putrmtabent () and fputrmtabent (). * utils/mountd/rmtab.c (mountlist_add): Likewise. (mountlist_del): Likewise. (mountlist_del_all): Likewise. (mountlist_list): Likewise. * utils/mountd/rmtab.c (mountlist_add): Increment "r_count" for the existing entry and initialize "r_count" to 1. (mountlist_del): Decrement "r_count". --- support/export/rmtab.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'support/export/rmtab.c') diff --git a/support/export/rmtab.c b/support/export/rmtab.c index 4d0bc02..4e141c3 100644 --- a/support/export/rmtab.c +++ b/support/export/rmtab.c @@ -24,7 +24,7 @@ rmtab_read(void) nfs_export *exp; setrmtabent("r"); - while ((rep = getrmtabent(1)) != NULL) { + while ((rep = getrmtabent(1, NULL)) != NULL) { struct exportent *xp; struct hostent *hp = NULL; int htype; @@ -65,8 +65,8 @@ rmtab_read(void) xfunlock(lockid); return -1; } - while ((rep = getrmtabent(0)) != NULL) { - fputrmtabent(fp, rep); + while ((rep = getrmtabent(0, NULL)) != NULL) { + fputrmtabent(fp, rep, NULL); } if (rename(_PATH_RMTABTMP, _PATH_RMTAB) < 0) { xlog(L_ERROR, "couldn't rename %s to %s", -- cgit