aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoern Engel <joern@logfs.org>2012-07-23 14:00:22 -0700
committerJoern Engel <joern@logfs.org>2012-07-23 14:00:22 -0700
commitf5899dd2d6393b6c1df0b5302696a2a708c803e7 (patch)
tree9d7df41161451ee9b0ba25d44a02eabcd65d8257
parent948c0c54f06d4a6395fb20bb8e5f57b37816f362 (diff)
downloadblockconsole-master.tar.gz
bcon: Add a module parameter to support partitionsHEADmaster
The usual methods of hooking into the partition scanner does not work for partitions. Allow those who care to pass in a module parameter. Signed-off-by: Joern Engel <joern@logfs.org>
-rw-r--r--drivers/block/blockconsole.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/block/blockconsole.c b/drivers/block/blockconsole.c
index 09f239cf31591..91c27ce1b37a1 100644
--- a/drivers/block/blockconsole.c
+++ b/drivers/block/blockconsole.c
@@ -10,6 +10,7 @@
#include <linux/kref.h>
#include <linux/kthread.h>
#include <linux/mm.h>
+#include <linux/moduleparam.h>
#include <linux/mount.h>
#include <linux/random.h>
#include <linux/slab.h>
@@ -543,6 +544,14 @@ static void bcon_create_fuzzy(const char *name)
}
}
+static int bcon_setup(const char *val, struct kernel_param *kp)
+{
+ bcon_create_fuzzy(val);
+ return 0;
+}
+
+module_param_call(device, bcon_setup, NULL, NULL, 0200);
+
static DEFINE_SPINLOCK(device_lock);
static char scanned_devices[80];