Re: Bug#504721: Possible reason for serial console misdetection
On Wednesday 03 December 2008, Ferenc Wagner wrote:
> But why magic constants? Why not a simple union of the two structs?
> The original "paranoia" isn't any better in this respect. Or do we
> try to avoid the need to recompile if the struct is later extended?
> That sounds silly... Maybe I'll learn something now.
How would we magically get an updated version of the struct in our code
anyway if that changes? We're not including header files here. We're
making a copy of the code.
My guess would be that the reason for the paranoia field is exactly that
they wanted to allow for the possibility of a struct getting extended
without them noticing!
I guess it would make sense to at least mention in a comment what structs
are supposed to be used, but I don't really see any benefit in writing
them out.
I think it's also fairly safe to assume this is a stable API.
Disclaimer: I don't actually really know what I'm talking about...
Reply to: