Skip to contentSkip to conversation

nftl partitions not missing in /proc/partitions anymore

PATCH Peter Kundrat 1 participant 1 message May 25, 2001 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

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.

drivers/mtd/nftl.c +2 -0
@@ -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

Signature · 2 lines
Peter Kundrat
[email protected]