Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Nov 2009 15:24:24 -0500
From:      Joe Marcus Clarke <marcus@marcuscom.com>
To:        Peter Steele <psteele@maxiscale.com>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: Example of using mount() function?
Message-ID:  <1257107064.14555.58.camel@shumai.marcuscom.com>
In-Reply-To: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3375EB60@MBX03.exg5.exghost.com>
References:  <7B9397B189EB6E46A5EE7B4C8A4BB7CB3375EB60@MBX03.exg5.exghost.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-/gaFCUvERS6Wu2kZ7VcM
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

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:
>=20
>                 mount -t ufs -o noatime /dev/adXXX /mnt
>=20
> The man page lists the signature of mount() as
>=20
>                 int mount(const char *type, const char *dir, int flags, v=
oid *data);
>=20
> The problem is that the last parameter, data, apparently has to be in a s=
pecial structure based on the file system type and it does not describe wha=
t this structure is for ufs. It says "The format for these argument structu=
res is described in the manual page for each file system", then it follows =
this up saying that there is no man page for ufs?
>=20
> 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

--=20
PGP Key : http://www.marcuscom.com/pgp.asc

--=-/gaFCUvERS6Wu2kZ7VcM
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEABECAAYFAkrt7ncACgkQb2iPiv4Uz4fHdQCgjB2mKHuu3z4Xi52El2G4lS71
IR0An2AmSM+NKfabtUA+6spkoB99TfvM
=2pu6
-----END PGP SIGNATURE-----

--=-/gaFCUvERS6Wu2kZ7VcM--




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