Subject: Re: Incorrect vattr passed to VOP_SYMLINK?
To: Julio M. Merino Vidal <jmmv84@gmail.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 08/15/2005 10:25:47
--h31gzZEtNLTqOjlF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Aug 15, 2005 at 06:22:48PM +0200, Julio M. Merino Vidal wrote:
> On 8/15/05, Jason Thorpe <thorpej@shagadelic.org> wrote:
> >=20
> > On Aug 15, 2005, at 1:20 AM, Julio M. Merino Vidal wrote:
> >=20
> > > The thing is that I have a common function used by all VOPs that
> > > create new nodes.  This function bases its decision on the kind of
> > > object that has to be created on the value of va_type, and was
> > > working fine until I added symlinks, because the attribute had
> > > the VNON value.
> >=20
> > Why not pass the type as a separate argument to that function, and
> > then just always pass VLNK in the VOP_SYMLINK() case?  That is what I
> > have done in file systems on other operating systems.
>=20
> Yes, of course I can do that.  I just wanted to avoid it because it seemed
> redundant if va_type also held the same value (which always does except
> for this specific case).

Since we almost always get it right, I'd say just set the va_type=20
correctly.

Take care,

Bill

--h31gzZEtNLTqOjlF
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFDANAaWz+3JHUci9cRAodOAJ9T6S5s99w2AKiG3tSpa1Y4wKWdIQCeJ+bA
FtimDnA/ipDecmqWx+IiGeE=
=UWhV
-----END PGP SIGNATURE-----

--h31gzZEtNLTqOjlF--