[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[altq 1053] Re: altq not working in NetBSD 1.5
Myrddin Emrys wrote:
> In my copy of /miscfs/specfs/spec_vnops.c (NetBSD) the only line that
> contains 'nchrdev' returns an error that specifically mentions that
> variable... in other words, if it was that error, I would be receiving an
> error that mentions the variable, and I do not.
You have already learned how to use printf() to prove your assumption...
I thought you can easily find the cause of the problem by inserting a
few more printfs...
> That same variable is mentioned over a hundred times in other files, so I'm
> not completely ruling that out... but it doesn't seem likely given my
> limited understanding. Throughout the code, the value of nchrdev seems to be
> variable... determined at runtime based on sizeof(somechardevarray), not
> fixed at compile time.
I don't think "nchrdev" is related but "nchrdev" is determined at
compile time by dividing the entire array size by the element size.
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw);