Page MenuHomeFreeBSD

align nfsdumpstate column output
ClosedPublic

Authored by yocalebo_gmail.com on Jan 25 2019, 5:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 22, 2:35 PM
Unknown Object (File)
Fri, Mar 22, 2:35 PM
Unknown Object (File)
Mar 8 2024, 6:19 AM
Unknown Object (File)
Jan 31 2024, 7:34 PM
Unknown Object (File)
Jan 29 2024, 2:51 AM
Unknown Object (File)
Jan 3 2024, 6:40 AM
Unknown Object (File)
Dec 20 2023, 3:03 AM
Unknown Object (File)
Nov 29 2023, 3:23 PM
Subscribers

Details

Summary

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.

Sponsored by: iXsystems

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Hm, this will break the output. For the better, I think. Does it need a man page change as well?

I don't believe it will need a man page change because the dump_lockstate function already prints a blank for this column when a call back address isn't found.

Ok, seems good to me then.

This revision is now accepted and ready to land.Jan 25 2019, 5:41 PM

This is still needed but the code has changed so the patch must be adapted.

This revision now requires changes to proceed.Mar 24 2021, 6:27 PM

This is still needed but the code has changed so the patch must be adapted.

Thanks, I've updated the diff accordingly.

This revision is now accepted and ready to land.Mar 24 2021, 6:57 PM
usr.sbin/nfsdumpstate/nfsdumpstate.c
161

I missed this side of the diff when I first looked. It is fine to remove these lines, since inet_ntop can't fail in this case, however I might add an assert for that instead of the unbalanced if.

This revision now requires review to proceed.Mar 24 2021, 8:26 PM
This revision is now accepted and ready to land.Mar 24 2021, 8:27 PM
usr.sbin/nfsdumpstate/nfsdumpstate.c
161

You're right. I've updated the commit to keep the changes to specifically doing what my original commit was supposed to do.

This revision was automatically updated to reflect the committed changes.