[issue1253] mount -p reports bogus errors in chroot

Stathis Kamperis (via DragonFly issue tracker) sinknull at crater.dragonflybsd.org
Fri Jan 30 17:21:46 PST 2009


Stathis Kamperis <ekamperi at gmail.com> added the comment:

One could ask why mount -p needs /etc/fstab to list the *already* mounted
filesystems. This happens because device block name, mount point and mount flags
are stored inside the statfs structure (which is returned by getfsstat syscall),
but dump frequency and pass number of fsck are not. This means that mount -p
must open /etc/fstab, parse the lines and get the desired values for every
mounted filesystem.

Thats why simon you get 2 warnings for every mounted filesystem. One while
looking for freq and another one for passno.

The code path that interests us is I think the following:

for every mounted filesystem
   ---> putfsent
   --------> getfsspec
   --------------> setfsent [ opens etc/fstab, prints warning ]
   --------> getfsfile
   --------------> setfsent [ opens etc/fstab, prints warning ]

The reason that freq and passno values are printed, is that there are some
fallback values in the code.

Honestly I don't know how to fix this. The code is messy enough as it is and
adding more cornerstones would make it worse.

Regards,
Stathis

_____________________________________________________
DragonFly issue tracker <bugs at lists.dragonflybsd.org>
<http://bugs.dragonflybsd.org/issue1253>
_____________________________________________________





More information about the Bugs mailing list