diff options
Diffstat (limited to 'utils/nfsd/nfssvc.c')
-rw-r--r-- | utils/nfsd/nfssvc.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/utils/nfsd/nfssvc.c b/utils/nfsd/nfssvc.c index 683008e..8b85846 100644 --- a/utils/nfsd/nfssvc.c +++ b/utils/nfsd/nfssvc.c @@ -269,7 +269,7 @@ nfssvc_set_sockets(const int family, const unsigned int protobits, } void -nfssvc_setvers(unsigned int ctlbits, int minorvers41) +nfssvc_setvers(unsigned int ctlbits, int minorvers) { int fd, n, off; char *ptr; @@ -280,9 +280,12 @@ nfssvc_setvers(unsigned int ctlbits, int minorvers41) if (fd < 0) return; - if (minorvers41) - off += snprintf(ptr+off, sizeof(buf) - off, "%c4.1", - minorvers41 > 0 ? '+' : '-'); + for (n = NFS4_MINMINOR; n <= NFS4_MAXMINOR; n++) { + if (NFSCTL_VERISSET(minorvers, n)) + off += snprintf(ptr+off, sizeof(buf) - off, "+4.%d ", n); + else + off += snprintf(ptr+off, sizeof(buf) - off, "-4.%d ", n); + } for (n = NFSD_MINVERS; n <= NFSD_MAXVERS; n++) { if (NFSCTL_VERISSET(ctlbits, n)) off += snprintf(ptr+off, sizeof(buf) - off, "+%d ", n); |