[CFT] Fix DEVFS aliases in subdirectories.
Kostik Belousov
kostikbel at gmail.com
Sat Jun 11 11:14:19 UTC 2011
On Sat, Jun 11, 2011 at 10:09:40AM +0300, Jaakko Heinonen wrote:
>
> 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.
Alternatively, you might change devfs_readlink, prepending the absolute
symlinks with the statfs.f_mntonname. This indeed would have to consider
the case of a jailed process. No, I am not requesting this.
> >
> > 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20110611/1f6fe1a9/attachment.pgp
More information about the freebsd-fs
mailing list