Example of using mount() function?

Peter Steele psteele at maxiscale.com
Sun Nov 1 20:12:53 UTC 2009

I want to call the mount() function to perform the same action as running the following mount command from the command line:

                mount -t ufs -o noatime /dev/adXXX /mnt

The man page lists the signature of mount() as

                int mount(const char *type, const char *dir, int flags, void *data);

The problem is that the last parameter, data, apparently has to be in a special structure based on the file system type and it does not describe what this structure is for ufs. It says "The format for these argument structures is described in the manual page for each file system", then it follows this up saying that there is no man page for ufs?

I did some searches but could not find a single example of what needs to be plugged into this parameter. Can anyone fill in the missing info?

More information about the freebsd-questions mailing list