[Crash-utility] [PATCH] SIAL {files, ps}.c: typedef task_t only for new kernels
Dave Anderson
anderson at redhat.com
Mon Feb 4 14:57:20 UTC 2008
Bernhard Walle wrote:
> The SIAL interpreter is confused by typedef'ing task_t in kernel versions that
> already have that typedef in the kernel. The typedef was removed with kernel
> 2.6.18, so adding the typedef only when LINUX_RELEASE is greater than 2.6.17
> fixes the problem.
>
>
> Signed-off-by: Bernhard Walle <bwalle at suse.de>
>
> ---
> files.c | 2 ++
> ps.c | 3 +++
> 2 files changed, 5 insertions(+)
>
> --- a/files.c
> +++ b/files.c
> @@ -129,7 +129,9 @@ sfiles_help()
> " DENTRY INODE SUPERBLK TYPE PATH\n"+
> " f745fd60 f7284640 f73a3e00 REG /var/spool/lpd/lpd.lock\n";
> }
> +#if LINUX_RELEASE > 0x020611
> typedef struct task_struct task_t;
> +#endif
>
> void print_task_header(unsigned long tval, int newline)
> {
> --- a/ps.c
> +++ b/ps.c
> @@ -62,7 +62,10 @@ main()
> return 1;
> }
>
> +#if LINUX_RELEASE > 0x020611
> typedef struct task_struct task_t;
> +#endif
> +
> struct mm_struct *x;
> void
> walk_tasks(string callback)
>
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
http://people.redhat.com/anderson/extensions/ps.c and
http://people.redhat.com/anderson/extensions/files.c have
been updated with the patch above.
More information about the Crash-utility
mailing list