[OpenIndiana-discuss] e2fsprogs header file bug

Andrey N. Oktyabrski ano at bestmx.ru
Fri Oct 28 18:45:28 UTC 2011


On 28.10.11 18:29, James Carlson wrote:
>> pkg:/system/file-system/e2fsprogs at 1.41.14-0.151.1
>
> That doesn't come with the system.  It's part of OI-SFE.
>
> Looking over the software, it doesn't look to me like anyone should
> assume that if the header files are present, then the kernel bits are
> present as well.  These programs are for "compatibility" -- specifically
> on systems that lack those Linux-specific file systems.
>
>>> My guess, though, is that he's really not at fault here, and that the
>>> fault really lies with the software that is making assumptions about
>>> what those files represent.  Writing portable software is harder than
>>> that.  Reading through that problem report, though, makes it sound like
>>> those other developers aren't going to agree with me.  :-/
>> I think, if any header file uses some macro, it must include header file
>> with definition for this macro. Am I wrong?
>
> To that last question, I'd say "yes."
>
> I can see no need for any requirement that all of the macros defined in
> a header file must be usable in all contexts.  There are cases where the
> macros defined are usable only in certain contexts -- such as when
> building a kernel module or when compiling for debug or with certain
> optional features.
>
> Yes, I do think that, as a design point, it's a good thing for header
> files shipped with the system to be stand-alone, meaning that they can
> be compiled successfully without needing prior includes.
>
> But, aside from that, I don't believe it's a requirement that anything
> inside is usable by anyone, unless it's actually _documented_ to be
> useful.  In this case, I can see no documentation related to e2fsprogs
> that suggests that including this header file will somehow get you
> EXT2FS-related kernel ioctl support.
>
> You might have an argument that e2fsprogs shouldn't include this header
> file.  Most projects (for what it's worth) just toss in the kitchen sink
> -- anything that's built is shipped, even if it's not normally useful
> for anyone outside of the project.
Thanks for detailed explanation, you are right. But if you don't want to 
give someone something, don't give it. Otherwise it is a cheese in a 
mousetrap.
Perhaps, it is necessary to remove unusable headers from system?

> Perhaps Ken Mays might have something to say about it.
I would be glad to hear his opinion.



More information about the OpenIndiana-discuss mailing list