/* Should be declared to not taint the kernel. */
MODULE_LICENSE("GPL");
+#ifndef SUBJECT
+#define SUBJECT "world"
+#endif
+
/* Our init function: returns 0 if successfull, an error code, otherwise. */
static int hello_init(void)
{
/* printk is just like printf, but without floating point support. */
- printk(KERN_ALERT "Hello, world!\n");
+ printk(KERN_ALERT "Hello, " SUBJECT "!\n");
return 0;
}
static void hello_exit(void)
{
/* KERN_ALERT is a string macro prepended to our message. */
- printk(KERN_ALERT "Goodbye, cruel world!\n");
+ printk(KERN_ALERT "Goodbye, cruel " SUBJECT "!\n");
}
/* Here, we declare our module init and exit functions. */