From owner-svn-src-stable-9@FreeBSD.ORG Thu Feb 7 08:27:49 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2C14D4DA; Thu, 7 Feb 2013 08:27:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0198DC12; Thu, 7 Feb 2013 08:27:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r178RmjK070291; Thu, 7 Feb 2013 08:27:48 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r178RmIW070290; Thu, 7 Feb 2013 08:27:48 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201302070827.r178RmIW070290@svn.freebsd.org> From: Alexander Motin Date: Thu, 7 Feb 2013 08:27:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r246455 - stable/9/sys/fs/devfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2013 08:27:49 -0000 Author: mav Date: Thu Feb 7 08:27:48 2013 New Revision: 246455 URL: http://svnweb.freebsd.org/changeset/base/246455 Log: MFC r235922: Revert devfs part of r235911. I was unaware about old but unfinished discussion between kib@ and gibbs@ about it. Modified: stable/9/sys/fs/devfs/devfs_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/devfs/devfs_vnops.c ============================================================================== --- stable/9/sys/fs/devfs/devfs_vnops.c Thu Feb 7 08:20:03 2013 (r246454) +++ stable/9/sys/fs/devfs/devfs_vnops.c Thu Feb 7 08:27:48 2013 (r246455) @@ -1276,53 +1276,8 @@ static int devfs_readlink(struct vop_readlink_args *ap) { struct devfs_dirent *de; - struct cdev_priv *cdp; de = ap->a_vp->v_data; - cdp = de->de_cdp; - - if (cdp != NULL && (cdp->cdp_c.si_flags & SI_ALIAS) != 0) { - struct devfs_mount *dmp; - struct prison *pr; - char *mp; - int mp_len; - int pr_path_len; - int err; - - /* - * For device aliases, construct an absolute symlink (to - * shorten its length and avoid the ugliness of a relative - * link) by prepending the fully qualified path to the root - * of this devfs. For a non-jailed process, the devfs root - * is our mount point. For a jailed process, we must remove - * any jail prefix in our mount point so that our response - * matches the user process's world view. - */ - dmp = VFSTODEVFS(ap->a_vp->v_mount); - mp = dmp->dm_mount->mnt_stat.f_mntonname; - mp_len = strlen(mp); - - pr = ap->a_cred->cr_prison; - pr_path_len = strlen(pr->pr_path); - - if (strncmp(pr->pr_path, mp, pr_path_len) == 0 - && mp[pr_path_len] == '/') { - mp += pr_path_len; - mp_len -= pr_path_len; - } - - err = uiomove(mp, mp_len, ap->a_uio); - if (err != 0) - return (err); - - /* - * Devfs cannot be the root file system, so its - * mount point must always be terminated by a '/'. - */ - err = uiomove("/", 1, ap->a_uio); - if (err != 0) - return (err); - } return (uiomove(de->de_symlink, strlen(de->de_symlink), ap->a_uio)); }