On Fri, Sep 08, 2006 at 12:42:44AM -0700, Andrew Morton wrote:
> On Thu, 7 Sep 2006 19:23:29 +0530
> Ankita Garg <[email protected]> wrote:
>
> > +#include<linux/ide.h>
>
> s390 doesn't have this, so it breaks the build.
>
There could be two ways to solve the build issue on s390. One is to
conditionally include the "ide.h" file depending on whether CONFIG_IDE is
defined. The second method would be to make LKDTM dependent on IDE. But this
approach is not right as it would prevent usage of the module on s390
completely.
> And #include is followed by a space, please.
Done.
Thanks,
Ankita
o This patch enables lkdtm to be built on s390
Signed-off-by: Ankita Garg <[email protected]>
--
lkdtm.c | 28 ++++++++++++++++++----------
1 files changed, 18 insertions(+), 10 deletions(-)
Index: linux-2.6.18-rc6-mm1/drivers/misc/lkdtm.c
===================================================================
--- linux-2.6.18-rc6-mm1.orig/drivers/misc/lkdtm.c 2006-09-11 20:58:53.000000000 +0530
+++ linux-2.6.18-rc6-mm1/drivers/misc/lkdtm.c 2006-09-11 21:06:43.000000000 +0530
@@ -43,15 +43,18 @@
* to trigger an action. The default is 10.
*/
-#include<linux/kernel.h>
-#include<linux/module.h>
-#include<linux/kprobes.h>
-#include<linux/kallsyms.h>
-#include<linux/init.h>
-#include<linux/irq.h>
-#include<linux/ide.h>
-#include<linux/interrupt.h>
-#include<scsi/scsi_cmnd.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/kprobes.h>
+#include <linux/kallsyms.h>
+#include <linux/init.h>
+#include <linux/irq.h>
+#include <linux/interrupt.h>
+#include <scsi/scsi_cmnd.h>
+
+#ifdef CONFIG_IDE
+#include <linux/ide.h>
+#endif
#define NUM_CPOINTS 8
#define NUM_CPOINT_TYPES 5
@@ -176,6 +179,7 @@
return 0;
}
+#ifdef CONFIG_IDE
int jp_generic_ide_ioctl(ide_drive_t *drive, struct file *file,
struct block_device *bdev, unsigned int cmd,
unsigned long arg)
@@ -184,7 +188,7 @@
jprobe_return();
return 0;
}
-
+#endif
static int lkdtm_parse_commandline(void)
{
@@ -304,8 +308,12 @@
lkdtm.entry = (kprobe_opcode_t*) jp_scsi_dispatch_cmd;
break;
case IDE_CORE_CP:
+#ifdef CONFIG_IDE
lkdtm.kp.symbol_name = "generic_ide_ioctl";
lkdtm.entry = (kprobe_opcode_t*) jp_generic_ide_ioctl;
+#else
+ printk(KERN_INFO "lkdtm : Crash point not available\n");
+#endif
break;
default:
printk(KERN_INFO "lkdtm : Invalid Crash Point\n");
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]