Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Jun 2011 10:09:40 +0300
From:      Jaakko Heinonen <jh@FreeBSD.org>
To:        "Justin T. Gibbs" <gibbs@scsiguy.com>
Cc:        fs@FreeBSD.org
Subject:   Re: [CFT] Fix DEVFS aliases in subdirectories.
Message-ID:  <20110611070939.GC10793@jh>
In-Reply-To: <4DF287F0.8080301@scsiguy.com>
References:  <4DF287F0.8080301@scsiguy.com>

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


Hi,

On 2011-06-10, Justin T. Gibbs wrote:
> The aliased devs are far from the root and so must have "../" entries
> added in order to function correctly.  I considered making the symlink
> paths absolute, but that complicates jail handling.
> 
> Are there any objections to the attached change?

> @@ -584,14 +584,43 @@
>  
>  		de = devfs_newdirent(s, q - s);
>  		if (cdp->cdp_c.si_flags & SI_ALIAS) {
> +			char *slash;
> +			int depth;
> +			int namelen;
> +			int buflen;
> +			int i;

style(9) discourages putting declarations inside blocks. Please consider
putting symlink name generation to its own helper function.
devfs_populate_loop() has already become too large.

-- 
Jaakko



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