From owner-freebsd-questions@FreeBSD.ORG Sun Nov 1 20:24:19 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5312106568B for ; Sun, 1 Nov 2009 20:24:19 +0000 (UTC) (envelope-from marcus@marcuscom.com) Received: from creme-brulee.marcuscom.com (marcuscom-pt.tunnel.tserv1.fmt.ipv6.he.net [IPv6:2001:470:1f00:ffff::1279]) by mx1.freebsd.org (Postfix) with ESMTP id 39B518FC13 for ; Sun, 1 Nov 2009 20:24:19 +0000 (UTC) Received: from [IPv6:2001:470:1f00:2464::4] (shumai.marcuscom.com [IPv6:2001:470:1f00:2464::4]) by creme-brulee.marcuscom.com (8.14.3/8.14.3) with ESMTP id nA1KPBq8037592; Sun, 1 Nov 2009 15:25:11 -0500 (EST) (envelope-from marcus@marcuscom.com) From: Joe Marcus Clarke To: Peter Steele In-Reply-To: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3375EB60@MBX03.exg5.exghost.com> References: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3375EB60@MBX03.exg5.exghost.com> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-/gaFCUvERS6Wu2kZ7VcM" Organization: MarcusCom, Inc. Date: Sun, 01 Nov 2009 15:24:24 -0500 Message-Id: <1257107064.14555.58.camel@shumai.marcuscom.com> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on creme-brulee.marcuscom.com Cc: "freebsd-questions@freebsd.org" Subject: Re: Example of using mount() function? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2009 20:24:19 -0000 --=-/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--