From: Ingo Schwarze Subject: Re: swapctl.8: state that nfsmntpt=/path should be crated as directory To: "Kirill A. Korinsky" Cc: tech@openbsd.org Date: Wed, 6 Aug 2025 15:57:11 +0200 Hello Kirill, Kirill A. Korinsky wrote on Wed, Aug 06, 2025 at 01:46:41PM +0200: > I had noticed that nfsmntpt option do not state that /path should > exist and it should be a directory, and not a file. [...] > Thought? Ok? I think your reaoning makes sense. The mount(8) manual says: DESCRIPTION [...] A mount point node must be an existing directory [...] The mount(2) manual says: ERRORS [...] [ENOENT] A component of dir does not exist. [ENOTDIR] A component of dir is not a directory, [...] > Index: swapctl.8 > =================================================================== > RCS file: /home/cvs/src/sbin/swapctl/swapctl.8,v > diff -u -p -r1.37 swapctl.8 > --- swapctl.8 9 Jul 2024 05:19:41 -0000 1.37 > +++ swapctl.8 6 Aug 2025 11:45:52 -0000 > @@ -178,10 +178,11 @@ This value can be any valid integer, > with higher values receiving less priority. > .It nfsmntpt=/path > This option is useful for swapping to NFS files. > -It specifies the local mount point to mount an NFS filesystem. > -Typically, once > -this mount has succeeded, the file to be used for swapping on will > -be available under this mount point. > +It specifies the local mount point > +.Pa /path Please use .Pf / Ar path instead. The meaning of ".Pa /path" would be "the directory with the literal name /path" - but nobody is going to call their NFS swap partition "/path". Using the .Ar macro signals that "path" is a placeholder for the actual path, which is an argument to the option being documented. > +to mount an NFS filesystem which shoud exist as a directory. I think the following would read better; as a minimum, you would have to apply s/shoud/should/, but usually not using "should" in manuals is better when it's trivial to avoid. It specifies an existing directory .Pf / Ar path to be used as the local mount point for an NFS file system. That would be OK schwarze@. Ingo > +Typically, once this mount has succeeded, the file to be used for > +swapping on will be available under this mount point. > For example: > .Bd -literal > server:/export/swap/client none swap sw,nfsmntpt=/swap