Subject: Re: printing with acroread7 and cups
To: Eric Haszlakiewicz <erh@nimenees.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-pkg
Date: 09/01/2005 14:49:32
--oTHb8nViIGeoXxdp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Thu, Sep 01, 2005 at 04:40:28PM -0500, Eric Haszlakiewicz wrote:
> On Thu, Sep 01, 2005 at 01:21:38PM -0700, Bill Studenmund wrote:
> > On Thu, Sep 01, 2005 at 02:49:29PM -0500, Eric Haszlakiewicz wrote:
> > > Try running with the patch at:
> > > ftp://ftp.netbsd.org/pub/misc/erh/emul/emul_getcwd.diff
> > > and see if it makes any difference.
> >=20
> > Looking at the right file, I have two questions:
> oops. I guess I should have tried the link instead of
> just typing it from memory. :|
>=20
> > 1) what exactly are you trying to do? A comment or two would help.
>=20
> Erase the emulation root dir from any cwd that has it. i.e.:
> figure out what the emulation dir (e.g. /emul/linux) actually points to.
> (on my machine, and most I think, /usr/pkg/emul/linux)
> then see if the path returned from getcwd starts with that
> (e.g. "/usr/pkg/emul/linux/bin")
> and if so, remove it.
> (e.g. turning the path into just "/bin"
> I'll add some comments.
I'm not sure what I think of this. But I'll defer that for other messages.=
=20
I am concerned that we may introduce more problems than we solve.
> > 2) Where do you clean up the vnode returned by namei()?
> I thought I needed to do something with it, but I wasn't quite sure what.
> I tried vput() immediately after the namei call, since that's what other =
code
> paths seem to do, but that panic'd with a releasing unlocked lock error.
You need vrele(). From the comments for lookup() (called by namei()):
* If
* the target of the pathname exists and LOCKLEAF is or'ed into the flag
* the target is returned locked, otherwise it is returned unlocked.
So vput() was wrong as the vnode wasn't locked. However you do need to do=
=20
something to release it. vrele(). :-)
Take care,
Bill
--oTHb8nViIGeoXxdp
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)
iD8DBQFDF3dsWz+3JHUci9cRAia5AJ9bhZip/fA+2F7VcxYHk8SuLq61BgCfaC/J
Zlg5QP/9Zbbk1CGUFcG38XI=
=lxoD
-----END PGP SIGNATURE-----
--oTHb8nViIGeoXxdp--