~ubuntu-branches/ubuntu/utopic/crash/utopic-proposed

« back to all changes in this revision

Viewing changes to debian/patches/01_task_info_to_stack.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Troy Heber
  • Date: 2007-05-24 13:06:14 UTC
  • Revision ID: james.westby@ubuntu.com-20070524130614-6hhy02z8y1iqoodk
Tags: 4.0-4.1-2
Added patch to support 2.6.22 kernels where task_struct.thread_info was
renamed to stack

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 01_task_info_to_stack.dpatch by Troy Heber <troyh@debian.org>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: No description.
 
6
 
 
7
@DPATCH@
 
8
diff -urNad crash-4.0-4.1~/task.c crash-4.0-4.1/task.c
 
9
--- crash-4.0-4.1~/task.c       2007-04-26 14:45:59.000000000 -0600
 
10
+++ crash-4.0-4.1/task.c        2007-05-24 13:01:56.000000000 -0600
 
11
@@ -160,8 +160,16 @@
 
12
                get_idle_threads(&tt->idle_threads[0], kt->cpus);
 
13
        }
 
14
 
 
15
-        MEMBER_OFFSET_INIT(task_struct_thread_info, "task_struct", 
 
16
-               "thread_info");
 
17
+
 
18
+       if (MEMBER_EXISTS("task_struct", "thread_info"))
 
19
+               MEMBER_OFFSET_INIT(task_struct_thread_info, "task_struct",
 
20
+                               "thread_info");
 
21
+       else if (MEMBER_EXISTS("task_struct", "stack"))
 
22
+               MEMBER_OFFSET_INIT(task_struct_thread_info, "task_struct",
 
23
+                               "stack");
 
24
+       else
 
25
+               ASSIGN_OFFSET(task_struct_thread_info) = INVALID_OFFSET;
 
26
+
 
27
        if (VALID_MEMBER(task_struct_thread_info)) {
 
28
                MEMBER_OFFSET_INIT(thread_info_task, "thread_info", "task"); 
 
29
                MEMBER_OFFSET_INIT(thread_info_cpu, "thread_info", "cpu");