Commit Graph

7 Commits

Author SHA1 Message Date
Caleb St. John
efad9c8ba3 align nfsdumpstate column output
There are scenarios where an NFS client will mount an NFSv4 export
without specifying a callback address.

When running nfsdumpstate under this circumstance, the column output is
shifted incorrectly which places the "ClientID" value underneath the
"Clientaddr" column.

This diff is a small cosmetic change that prints a blank in the
"Clientaddr" column and ensures the data for the columns are aligned
appropriately.

Submitted by:	Caleb St. John
Reviewed by:	sef (previous version)
MFC after:	3 days
Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D18958
2021-03-24 16:33:41 -04:00
Rick Macklem
32e5d7a42e Add #ifdef INET6 around declaration of nbuf.
It was reported that without #ifdef INET6 around the declaration of "nbuf",
a build would report an unused variable. For some reason, I didn't see that
warning when I did a build, but it seems reasonable to add these #ifdef INET6's.

Submitted by:	dmitryluhtionov@gmail.com
MFC after:	1 week
2019-04-28 22:37:59 +00:00
Rick Macklem
f736b5f9e9 Add support to nfsdumpstate for printing of INET6 addresses for locks.
r346190 added support for printing of INET6 addresses for the "-o" option
(all opens) but missed adding support for INET6 addresses for the "-l" option.
This patch adds that support.

PR:		223036
MFC after:	1 week
2019-04-25 21:25:32 +00:00
Rick Macklem
11f0e011c8 Fix nfsdumpstate(8) so that it can print out INET6 callback addresses.
The patch adds support for printing of INET6 callback addresses.
It also adds the #ifdef INET, INET6 as requested by bz@.

PR:		223036
Reviewed by:	bz, rgrimes
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D19839
2019-04-13 21:45:45 +00:00
Rick Macklem
1248463c17 Fix handling of the "-l" argument for nfsdumpstate(8).
Submitted by:	zack.kirsch at isilon.com
MFC after:	2 weeks
2010-07-20 00:32:11 +00:00
Xin LI
9964058e79 Code cleanup for nfs4 utilities:
- Mark internal routines as static;
 - Eliminate unused parameters where possible, mark __unused for others;
 - Remove unused variables;
 - Use %jd for int64_t values in printf();
 - Add appropriate %d for printf to match its parameter;
 - Rename a variable to resolve conflict with revoke(2);

Reviewed by:	rmacklem
Tested with:	make universe (bugs are mine)
2009-05-29 22:19:45 +00:00
Rick Macklem
03914b0bb2 Add two new utilities and two new daemons to /usr/src/usr.sbin that
are specifically used by the experimental nfsv4 subsystem.
  nfscbd - The NFSv4 client callback daemon.
  nfsuserd - The NFSv4 daemon that maps between user and group name
           and their corresponding uid/gid numbers.
  nfsdumpstate - A utility that dumps out the NFSv4 Open/Lock state.
  nfsrevoke - Administratively revokes an NFSv4 client, releasing all
           NFSv4 Open/Lock state it holds on the server.

Approved by:	kib (mentor)
2009-05-26 15:19:04 +00:00