nftl partitions not missing in /proc/partitions anymore

Peter Kundrat kundrat at kundrat.sk
Thu May 24 16:07:37 EDT 2001


Hola,

Having kgdb compiled in i had a look why we didnt have nftl
partitions listed in /proc/partitions. The reason is that
nr_real field of struct gendisk wasnt set. Patch is against
kernel version, but applies on CVS as well (providing you give
patch correct name). Anyways its a one-liner, so its trivial.

--- Linux-2.4.3.orig/drivers/mtd/nftl.c	Fri Apr  6 08:07:24 2001
+++ linux-magic3/drivers/mtd/nftl.c	Thu May 24 21:23:23 2001
@@ -204,6 +204,8 @@
 	nftl_sizes[firstfree * 16] = nftl->nr_sects;
 	//nftl_blocksizes[firstfree*16] = 512;
 	part_table[firstfree * 16].nr_sects = nftl->nr_sects;
+	
+	nftl_gendisk.nr_real++;
 
 	/* partition check ... */
 #if LINUX_VERSION_CODE < 0x20328


Regards,

	pkx
-- 
Peter Kundrat
peter at kundrat.sk




More information about the linux-mtd mailing list