Date: Mon, 11 Feb 2002 09:40:49 +0100 From: =?ISO-8859-2?Q?Pawe=B3_Jakub_Dawidek?= <nick@garage.freebsd.pl> To: freebsd-hackers@freebsd.org Subject: Devices and namei(9). Message-ID: <20020211094049.B251@garage.freebsd.pl>
next in thread | raw e-mail | index | archive | help
--wzJLGUyc3ArbnUjN Content-Type: text/plain; charset=ISO-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. I got problem with namei(9) and some devices. Example (catching syscall open()): static int n_open(register struct proc *p, register struct open_args *ea) { [...] long finode =3D 0; struct nameidata nd, *ndptr; [...] ndptr =3D &nd; NDINIT(ndptr, LOOKUP, FOLLOW | SAVENAME, UIO_USERSPACE, ea->path, p); if (!namei(ndptr)) if (!VOP_GETATTR(ndptr->ni_vp, &va, p->p_ucred, p)) finode =3D va.va_fileid; [...] } I use namei() coz i want file inode. But when namei() will be called some devices are blocking. For example if I do in this way: [...] return open(p, ea); if (!namei(ndptr)) [...] Everything is oke, but: namei(ndptr) return open(p, ea); isn't. % mpg123 some.mp3 Can't open /dev/dsp! And /dev/dsp is completely fucked up, it is still busy even if I unload my module. Only reboot can free it. So what's going on? Or maybe there is some other way to get file inode? --=20 Pawe=B3 Jakub Dawidek Network Administrator. Am I Evil? Yes, I Am. --wzJLGUyc3ArbnUjN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: 2.6.3ia iQCVAwUBPGeDkT/PhmMH/Mf1AQEUoAP/Wh/P1ukaSSILkrfJVu85wRDb668a/Kwa kNLHgQjBg3oUlhAkiaLOv622FC9qGKKWzTj1EAcBHgbzUXyYVTm2AgHdh/TWuGsH 4tgcr/Eh9Z0CH+p4lGR/t+NEB/iHahsYZPsdjQCkbjqVC+uw+Qa29rF/4L9q65aB /WwUeUHTQDk= =nnyP -----END PGP SIGNATURE----- --wzJLGUyc3ArbnUjN-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020211094049.B251>