From owner-cvs-all@FreeBSD.ORG Wed Nov 23 20:51:16 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4D62716A420; Wed, 23 Nov 2005 20:51:16 +0000 (GMT) (envelope-from rodrigc@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B62FE43D67; Wed, 23 Nov 2005 20:51:15 +0000 (GMT) (envelope-from rodrigc@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id jANKpFa3093287; Wed, 23 Nov 2005 20:51:15 GMT (envelope-from rodrigc@repoman.freebsd.org) Received: (from rodrigc@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id jANKpFtJ093286; Wed, 23 Nov 2005 20:51:15 GMT (envelope-from rodrigc) Message-Id: <200511232051.jANKpFtJ093286@repoman.freebsd.org> From: Craig Rodrigues Date: Wed, 23 Nov 2005 20:51:15 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/kern vfs_mount.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 20:51:16 -0000 rodrigc 2005-11-23 20:51:15 UTC FreeBSD src repository Modified files: sys/kern vfs_mount.c Log: In nmount() and vfs_donmount(), do not strcmp() the options in the iovec directly. We need to copyin() the strings in the iovec before we can strcmp() them. Also, when we want to send the errmsg back to userspace, we need to copyout()/copystr() the string. Add a small helper function vfs_getopt_pos() which takes in the name of an option, and returns the array index of the name in the iovec, or -1 if not found. This allows us to locate an option in the iovec without actually manipulating the iovec members. directly via strcmp(). Noticed by: kris on sparc64 Revision Changes Path 1.204 +47 -37 src/sys/kern/vfs_mount.c