Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Nov 2009 14:12:50 -0600
From:      Peter Steele <psteele@maxiscale.com>
To:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Example of using mount() function?
Message-ID:  <7B9397B189EB6E46A5EE7B4C8A4BB7CB3375EB60@MBX03.exg5.exghost.com>

next in thread | raw e-mail | index | archive | help
I want to call the mount() function to perform the same action as running t=
he 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, voi=
d *data);

The problem is that the last parameter, data, apparently has to be in a spe=
cial 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 structure=
s is described in the manual page for each file system", then it follows th=
is 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?




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7B9397B189EB6E46A5EE7B4C8A4BB7CB3375EB60>