On Fri, Aug 19, 2022 at 03:30:11PM +0200, Otto Moerbeek wrote:
> On Fri, Aug 19, 2022 at 12:41:33PM +0200, Theo Buehler wrote:
> 
> > On Fri, Aug 19, 2022 at 12:26:41PM +0200, Otto Moerbeek wrote:
> > > Hoi,
> > > 
> > > mentioned on misc@. Existing code only handles numeric ids with no
> > > error checking.
> > > 
> > > Code stolen from mount_msdos.
> > >
> > > OK?
> > 
> > ok tb
> > 
> > I think the mount_ntfs and mount_msdos manpages could benefit from using
> > the wording in mount_tmpfs which is shorter and more precise.
> 
> reads better indeed, but I think you should also take the wording for
> -m in both cases.  The line about 'The default mask...' in
> mount_msdos(8) can then go.

I'm not sure what you mean.

Maybe I misunderstand your suggestion, but I don't think the wording of
-m from mount_tmpfs(8) applies to mount_msdos(8) and mount_ntfs(8). In
the latter, -m populates args.mask and args.mode, respectively, which
have the meaning of a mask according to mount(2). A quick glance at
ntfs_vnops.c and msdosfs_vnops.c seems to confirm that.

The mount_msdos documentation seems correct regarding -m and ntfs is a
bit incomplete, but I'd prefer if someone using this FS fixed that.

> 
>  -Otto
> 
> > 
> > Index: mount_msdos/mount_msdos.8
> > ===================================================================
> > RCS file: /cvs/src/sbin/mount_msdos/mount_msdos.8,v
> > retrieving revision 1.32
> > diff -u -p -r1.32 mount_msdos.8
> > --- mount_msdos/mount_msdos.8       13 Nov 2021 18:18:59 -0000      1.32
> > +++ mount_msdos/mount_msdos.8       19 Aug 2022 10:38:49 -0000
> > @@ -38,10 +38,10 @@
> >  .Sh SYNOPSIS
> >  .Nm mount_msdos
> >  .Op Fl 9ls
> > -.Op Fl g Ar gid
> > +.Op Fl g Ar group
> >  .Op Fl m Ar mask
> >  .Op Fl o Ar options
> > -.Op Fl u Ar uid
> > +.Op Fl u Ar user
> >  .Ar special
> >  .Ar node
> >  .Sh DESCRIPTION
> > @@ -81,11 +81,9 @@ Ignore the special Windows 95/98 directo
> >  if deleting or renaming a file.
> >  This forces
> >  .Fl s .
> > -.It Fl g Ar gid
> > -Set the group of the files in the file system to
> > -.Ar gid .
> > -The default group is the group of the directory
> > -on which the file system is being mounted.
> > +.It Fl g Ar group
> > +Specifies the group name or GID of the root inode of the file system.
> > +Defaults to the mount point's GID.
> >  .It Fl l
> >  Force listing and generation of
> >  Windows 95/98 long filenames
> > @@ -106,11 +104,9 @@ as described in
> >  .It Fl s
> >  Force behaviour to
> >  ignore and not generate Windows 95/98 long filenames.
> > -.It Fl u Ar uid
> > -Set the owner of the files in the file system to
> > -.Ar uid .
> > -The default owner is the owner of the directory
> > -on which the file system is being mounted.
> > +.It Fl u Ar user
> > +Specifies the user name or UID of the root inode of the file system.
> > +Defaults to the mount point's UID.
> >  .El
> >  .Pp
> >  File permissions for FAT file systems are imitated,
> > Index: mount_msdos/mount_msdos.c
> > ===================================================================
> > RCS file: /cvs/src/sbin/mount_msdos/mount_msdos.c,v
> > retrieving revision 1.34
> > diff -u -p -r1.34 mount_msdos.c
> > --- mount_msdos/mount_msdos.c       28 Jun 2019 13:32:45 -0000      1.34
> > +++ mount_msdos/mount_msdos.c       19 Aug 2022 10:39:44 -0000
> > @@ -202,6 +202,6 @@ usage(void)
> >  {
> >  
> >     fprintf(stderr,
> > -       "usage: mount_msdos [-9ls] [-g gid] [-m mask] [-o options] [-u uid] 
> > special node\n");
> > +       "usage: mount_msdos [-9ls] [-g group] [-m mask] [-o options] [-u 
> > user] special node\n");
> >     exit(1);
> >  }
> > Index: mount_ntfs/mount_ntfs.8
> > ===================================================================
> > RCS file: /cvs/src/sbin/mount_ntfs/mount_ntfs.8,v
> > retrieving revision 1.16
> > diff -u -p -r1.16 mount_ntfs.8
> > --- mount_ntfs/mount_ntfs.8 23 Apr 2020 21:28:09 -0000      1.16
> > +++ mount_ntfs/mount_ntfs.8 19 Aug 2022 10:39:00 -0000
> > @@ -41,10 +41,10 @@
> >  .Sh SYNOPSIS
> >  .Nm mount_ntfs
> >  .Op Fl ai
> > -.Op Fl g Ar gid
> > +.Op Fl g Ar user
> >  .Op Fl m Ar mask
> >  .Op Fl o Ar options
> > -.Op Fl u Ar uid
> > +.Op Fl u Ar group
> >  .Ar special
> >  .Ar node
> >  .Sh DESCRIPTION
> > @@ -89,11 +89,9 @@ The options are as follows:
> >  .It Fl a
> >  Force behaviour to return MS-DOS 8.3 names also on
> >  .Fn readdir .
> > -.It Fl g Ar gid
> > -Set the group of the files in the file system to
> > -.Ar gid .
> > -The default group is the group of the directory
> > -on which the file system is being mounted.
> > +.It Fl g Ar group
> > +Specifies the group name or GID of the root inode of the file system.
> > +Defaults to the mount point's GID.
> >  .It Fl i
> >  Make name lookup case insensitive for all names except POSIX names.
> >  .It Fl m Ar mask
> > @@ -106,11 +104,9 @@ flag followed by a comma separated strin
> >  See the
> >  .Xr mount 8
> >  man page for possible options and their meanings.
> > -.It Fl u Ar uid
> > -Set the owner of the files in the file system to
> > -.Ar uid .
> > -The default owner is the owner of the directory
> > -on which the file system is being mounted.
> > +.It Fl u Ar user
> > +Specifies the user name or UID of the root inode of the file system.
> > +Defaults to the mount point's UID.
> >  .El
> >  .Sh FEATURES
> >  .Ss NTFS file attributes
> > Index: mount_ntfs/mount_ntfs.c
> > ===================================================================
> > RCS file: /cvs/src/sbin/mount_ntfs/mount_ntfs.c,v
> > retrieving revision 1.17
> > diff -u -p -r1.17 mount_ntfs.c
> > --- mount_ntfs/mount_ntfs.c 28 Jun 2019 13:32:45 -0000      1.17
> > +++ mount_ntfs/mount_ntfs.c 19 Aug 2022 10:40:01 -0000
> > @@ -147,7 +147,7 @@ static void
> >  usage(void)
> >  {
> >     fprintf(stderr,
> > -       "usage: mount_ntfs [-ai] [-g gid] [-m mask] [-o options] [-u uid]"
> > +       "usage: mount_ntfs [-ai] [-g group] [-m mask] [-o options] [-u 
> > user]"
> >         " special node\n");
> >     exit(1);
> >  }

Reply via email to