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>

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

[-- Attachment #1 --]
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

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

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

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