[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[altq 1018] Re: re: can't open altq device on NetBSD
From: "Kenjiro Cho" <kjc@csl.sony.co.jp>
Sent: Wednesday, August 29, 2001 1:37 AM
Subject: [altq 1015] Re: re: can't open altq device on NetBSD
> Myrddin Emrys wrote:
>
> > This did not work for me. Changing the major number of the dev files
> > resulted in a new error:
> >
> > altqd[12424]: ALTQ config file is /etc/altq.conf
> > altqd: can't open altq device: Device not configured
>
> This error (ENXIO) is expected.
>
> What I don't understand is EBUSY at the following error message.
>
> altqd: can't open altq device: Device busy
>
> It's from tbr_install() in libaltq/qop.c at open(/dev/altq/altq, O_RDWR).
> The corresponding kernel code is altqopen() in sys/altq/altq_conf.c,
> and it always returns 0 for opening /dev/altq/altq (cdev minor 0).
I'm not a programmer, but if I understand you correctly you are saying the
error is in the userland code, not the kernel code? I'm not sure I
recompiled the userland tools after redoing my kernel the most recent time,
let's see if that's the issue... nope. Recompiled all the userland tools, no
change. :-(
I grepped all of the source code, and I didn't find EBUSY anywhere in the
userland code. It's all in the device code, and to be honest, I could only
understand in the most vague of ways what I was looking at. Functions can
potentially return EBUSY from 4 different areas (.c files): altq_cdnr,
_conf, _hfsc, and _subr.c. I'm assuming cdnr and hfsc are only relevant if I
use the related queuing disciplines, so I ignored them. The altq_conf.c file
was a confusing mishmash to me, but I did notice that altq_subr.c contained
another possibly relevant occurrence of EBUSY.
In the altq_attach() function, EBUSY can be returned. Judging by the name of
the function, it sounds like something that would be happening in some kind
of initializing routine. It contained code that implied its purpose is to
attach a queuing discipline to an interface and initialize it somehow...
could that be the source of the error?
Myrddin