lkml.org 
[lkml]   [2003]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject2.6 early userspace init

    Hi folks,

    how about adding something like this to init/do_mounts.c?

    --- do_mounts.c.orig 2003-11-12 12:49:12.000000000 +0100
    +++ do_mounts.c 2003-11-12 12:02:05.000000000 +0100
    @@ -14,6 +14,7 @@
    #include "do_mounts.h"

    extern int get_filesystem_list(char * buf);
    +extern asmlinkage long sys_access(const char * filename, int mode);

    int __initdata rd_doload; /* 1 = load RAM disk, 0 = don't load */

    @@ -393,6 +394,13 @@
    if (initrd_load())
    goto out;

    + /*
    + * check if there is an early userspace init, if yes
    + * let it do all the work
    + */
    + if (sys_access("/sbin/init", 0) == 0)
    + goto out;
    +
    if (is_floppy && rd_doload && rd_load_disk(0))
    ROOT_DEV = Root_RAM0;

    I wont to be able to fetch the boot= parameter via /proc/cmdline
    in kinit and choose the boot devices, so I dislike the boot=0:0
    suggestion.
    Also, should the above code clear the init= parameter, i.e.
    main.c:execute_command?

    Cheers,
    Michael.

    --
    Michael Schroeder mls@suse.de
    main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
    -
    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:58    [W:0.020 / U:0.632 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site