[CFT] Fix DEVFS aliases in subdirectories.

Jaakko Heinonen jh at FreeBSD.org
Sat Jun 11 07:25:03 UTC 2011


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


More information about the freebsd-fs mailing list