[Crash-utility] [patch] remove kernel header include file

Dave Anderson anderson at redhat.com
Wed Mar 22 13:40:35 UTC 2006


Nguyen Anh Quynh wrote:

> hi,
>
> lkcd_dump_v5.h includes <linux/list.h>, which unfortunately includes a
> kernel-only header. below is the content of <linux/list.h> on my box
> (Ubuntu 5.10): this file has only 1 line
>
> ^^^
> #include <linux/err_kernel_only.h>
> ^^^
>
> i guess you guys dont have this compiling problem because you are
> running Redhat/FC, not Ubuntu. obviously it is a bad idea to use a
> kernel header in userspace. so i propose a patch which puts a new
> list.h file in the source tree. please see the patch below (this
> "list.h" is taken from Xen source tree, but i guess you have already
> seen it in many places)
>
> Signed-off-by: Nguyen Anh Quynh <aquynh at gmail.com>
>
> # diffstat crash.diff
>  list.h         |  186 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  lkcd_dump_v5.h |    2
>  2 files changed, 187 insertions(+), 1 deletion(-)
>
>   ------------------------------------------------------------------------------------------------------------------------
>                  Name: crash.diff
>    crash.diff    Type: unspecified type (application/octet-stream)
>              Encoding: 7bit
>
>   ------------------------------------------------------------------------------------------------------------------------
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility

No, let's not do that.  There's no reason that the lkcd_v5.h file needs to
include linux/list.h:

  $ grep "list\.h" *.h
  lkcd_dump_v5.h:#include <linux/list.h>
  lkcd_dump_v7.h:#include <linux/list.h>
  lkcd_dump_v8.h://#include <linux/list.h>
  $

If it gets commented out of v5 and v7 the same way as it's done in v8,
the problem goes away.  I'll do that in the next release.

Thanks,
  Dave








More information about the Crash-utility mailing list