public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Why 'linux/fs.h' cannot be included? I *can*...
@ 2002-01-28 19:31 DervishD
  2002-01-28 19:44 ` Eric W. Biederman
  0 siblings, 1 reply; 16+ messages in thread
From: DervishD @ 2002-01-28 19:31 UTC (permalink / raw)
  To: Linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 445 bytes --]

    Hello all :))

    I've reading the source code for 'blockdev', from util-linux, and
the comments says that the header 'linux/fs.h' cannot be included.
I've tried, just adding an include and removing the hand made
definitions (cloning those of fs.h), and all works ok :??

    This header can be included or not? It works for me, with headers
from 2.4.17, so, is it just for backwards compatibility?

    Thanks a lot in advance :)
    Raúl

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: Why 'linux/fs.h' cannot be included? I *can*...
@ 2002-01-29 10:20 DervishD
  2002-01-29 14:30 ` Jeff Garzik
  0 siblings, 1 reply; 16+ messages in thread
From: DervishD @ 2002-01-29 10:20 UTC (permalink / raw)
  To: ebiederm, raul; +Cc: linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 734 bytes --]

    Hello Eric :)

>>     This header can be included or not? It works for me, with headers
>> from 2.4.17, so, is it just for backwards compatibility?
>Policy.  It is for forwards compatibility. The general policy on kernel
>headers is that if it breaks you get to keep the pieces.

    That is: I can include it if I just want the definition of a few
ioctl's, but if in a future version all that is changed or even
dissapears is completely my problem.

    Given the number of user-space apps that needs ioctl definitions
and things like those (that are supposed not to change easily), those
definitions should go in user-includable headers... IMHO.

    Fortunately, we have some of them in libc headers now.

    Thanks,
    Raúl

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: Why 'linux/fs.h' cannot be included? I *can*...
@ 2002-01-30 12:07 DervishD
  2002-01-30 14:27 ` Eric W. Biederman
  2002-01-30 16:12 ` Jeff Garzik
  0 siblings, 2 replies; 16+ messages in thread
From: DervishD @ 2002-01-30 12:07 UTC (permalink / raw)
  To: garzik, raul; +Cc: ebiederm, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1553 bytes --]

    Hi Jeff :)

>>     Given the number of user-space apps that needs ioctl definitions
>> and things like those (that are supposed not to change easily), those
>> definitions should go in user-includable headers... IMHO.
>> 
>>     Fortunately, we have some of them in libc headers now.
>The policy is, never ever include kernel headers from userspace.

    I know, but sometimes it is just impossible (when they aren't
appropriate glibc headers, for example). In fact, all this question
arose because I'm coding an 'ioctl' command line interface, so you
can send any 'documented' ioctl to any device. And, since I'm going
to start with block devices, I need linux/fs.h.

    The problem is that I don't want to copy the definitions I need
from linux/fs.h, because this will lead to problems if those
definitions change. Anyway this is not an issue, because by changing
the running kernel those definitions in fact may not be valid...

    Resuming: I don't know how properly address this problem.

>Your libc should provide a "sanitized" version of the kernel headers,
>which is completely separate from any kernel sources.

    I suppose that those headers will contain definitions not subject
to change, won't they? But I don't know if I can consider the ioctl
constants as not subject to change (they should be permanent, though).

>So, any problems should be reported to your libc maintainer :)

    Well, I try... I can even try to make the sanitized header myself
and pray for it to be included in next glibc revision :)

    Thanks :)
    Raúl

^ permalink raw reply	[flat|nested] 16+ messages in thread
[parent not found: <mailman.1012391761.28301.linux-kernel2news@redhat.com>]

end of thread, other threads:[~2002-01-31  2:35 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-28 19:31 Why 'linux/fs.h' cannot be included? I *can* DervishD
2002-01-28 19:44 ` Eric W. Biederman
  -- strict thread matches above, loose matches on Subject: below --
2002-01-29 10:20 DervishD
2002-01-29 14:30 ` Jeff Garzik
2002-01-29 14:51   ` Alan Cox
2002-01-29 14:42     ` Jeff Garzik
2002-01-30 12:07 DervishD
2002-01-30 14:27 ` Eric W. Biederman
2002-01-30 16:12 ` Jeff Garzik
     [not found] <mailman.1012391761.28301.linux-kernel2news@redhat.com>
2002-01-30 18:24 ` Pete Zaitcev
2002-01-30 23:33   ` Keith Owens
2002-01-31  1:17     ` Jeff Garzik
2002-01-31  1:51       ` Keith Owens
2002-01-31  1:57         ` Jeff Garzik
2002-01-31  2:06           ` Keith Owens
2002-01-31  2:35             ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox