lkml.org 
[lkml]   [2007]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] Ignore partition table on device
    Hello.

    This patch adds a new kernel parameter (ignore_partitions=device) to
    the kernel. It is useful when using a fake RAID with dmraid so that
    Linux won't complain about attemps to access the drive beyond its
    boundaries when udev and/or hald are started.

    --- linux-2.6.21.1/fs/partitions/check.c.orig 2007-06-02 14:19:26.000000000 +0200
    +++ linux-2.6.21.1/fs/partitions/check.c 2007-06-02 15:16:22.000000000 +0200
    @@ -39,6 +39,14 @@
    extern void md_autodetect_dev(dev_t dev);
    #endif

    +static char * __initdata ignore_dev;
    +static int __init ignore_dev_fn(char *str)
    +{
    + ignore_dev = str;
    + return 1;
    +}
    +__setup("ignore_partitions=", ignore_dev_fn);
    +
    int warn_no_part = 1; /*This is ugly: should make genhd removable media aware*/

    static int (*check_part[])(struct parsed_partitions *, struct block_device *) = {
    @@ -165,6 +173,13 @@
    sprintf(state->name, "p");

    state->limit = hd->minors;
    +
    + if (ignore_dev != NULL && !strcmp(state->name, ignore_dev)) {
    + memset(&state->parts, 0, sizeof(state->parts));
    + printk(" partition table ignored.\n");
    + return state;
    + }
    +
    i = res = err = 0;
    while (!res && check_part[i]) {
    memset(&state->parts, 0, sizeof(state->parts));
    --
    Jonathan
    -
    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: 2007-06-02 21:05    [W:0.032 / U:29.336 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site