[PATCH] [MTD] block2mtd.c: Make kernel boot command line arguments work (try 3)

Ville Herva vherva at vianova.fi
Wed Jul 12 13:24:00 EDT 2006


On Wed, Jul 12, 2006 at 11:50:48AM +0200, you [Jörn Engel] wrote:
> On Tue, 11 July 2006 09:23:42 +0300, Ville Herva wrote:
> > 
> > #ifdef MODULE clutter 
> 
> Good enough for now.  If the klibc discussion ever settles, the early
> initialization code could get moved to userspace.

Good. 

One thing I only noticed now, is that while static compile + no boot time
argument test case works, it does unnecessarily printk 
  error: cannot open device ""
since the argument parsing is invoked even when no argument is supplied.
This is of course harmless, as nothing really happens, but 

-	ret = block2mtd_setup2(block2mtd_paramline);
+	if (strlen(block2mtd_paramline)) 
+		ret = block2mtd_setup2(block2mtd_paramline);

might be sensible in block2mtd_init(). (I'm trusting that .initdata and
block2mtd_paramline are zero-initialized.)


-- v -- 

v at iki.fi





More information about the linux-mtd mailing list