From: Jonathan Schleifer <js@h3c.de>
To: aeb@cwi.nl
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Ignore partition table on device
Date: Sat, 2 Jun 2007 20:55:13 +0200 [thread overview]
Message-ID: <20070602205513.0312ebe0@localhost> (raw)
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
next reply other threads:[~2007-06-02 19:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-02 18:55 Jonathan Schleifer [this message]
2007-06-02 20:29 ` [PATCH] Ignore partition table on device H. Peter Anvin
2007-06-02 21:34 ` Jonathan Schleifer
2007-06-02 22:21 ` H. Peter Anvin
2007-06-02 22:43 ` Jonathan Schleifer
2007-06-02 23:49 ` H. Peter Anvin
2007-06-02 22:54 ` Andries Brouwer
[not found] <fa.4wKuD5mNHMp1umbfR+OImkVtgUw@ifi.uio.no>
[not found] ` <fa.vZzvuMSQgFqVdMg4HFBBvE7gt1s@ifi.uio.no>
2007-06-03 6:39 ` Robert Hancock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070602205513.0312ebe0@localhost \
--to=js@h3c.de \
--cc=aeb@cwi.nl \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox