lkml.org 
[lkml]   [2002]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH -ac] Panicking in morse code
    On Fri, 19 Jul 2002 12:27:51 -0500
    Eli Carter <eli.carter@inet.com> wrote:

    > Andrew Rodland wrote:
    > [snip]
    > > --Andrew
    > >
    > > P.S. Yes, in case anyone is wondering, I did create a module that
    > > does nothing but generate a user-supplied panic. :)
    >
    > *ROTFL* Actually, I can see that being useful for testing... I fear
    > you have tweaked my curiosity to see that particular implementation.
    > :)
    >

    Actually, it was pretty simple. It was also my first module ever.
    I had a lot of fun writing all of this stuff, but people keep
    indicating that maybe some of it could actually be useful. If that's
    the case, so much the better.

    panictest.c follows.

    --cut--

    #define __KERNEL__
    #define MODULE

    #include <linux/module.h>
    #include <linux/kernel.h>
    #include <linux/init.h>

    static char *string = "SOS SOS SOS";

    int __init panic_init(void) {
    panic(string);
    }

    module_init(panic_init);
    MODULE_LICENSE("GPL");
    MODULE_PARM(string, "s");
    MODULE_PARM_DESC(string, "The string to panic with.");
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:27    [W:0.024 / U:0.300 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site