On Sun, 2009-11-01 at 14:12 -0600, Peter Steele wrote: > 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?
See /usr/src/sbin/mount/mount_ufs.c from RELENG_6. Essentially, this argument should be a ufs_args struct as defined in /usr/include/ufs/ufs/ufsmount.h. Joe -- PGP Key : http://www.marcuscom.com/pgp.asc
signature.asc
Description: This is a digitally signed message part