# cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00040000 "RedBoot"
mtd1: 00200000 00040000 "zImage"
mtd2: 00180000 00040000 "initramfs"
mtd3: 00001000 00040000 "RedBoot config"
mtd4: 00040000 00040000 "FIS directory"
# cat /proc/partitions
major minor #blocks name
31 0 256 mtdblock0
31 1 2048 mtdblock1
31 2 1536 mtdblock2
31 3 4 mtdblock3
31 4 256 mtdblock4
代码位于drivers/mtd/mtdcore.c if ((proc_mtd = create_proc_entry( "mtd", 0, NULL ))) proc_mtd->read_proc = mtd_read_proc;
module_init(init_mtd);
代码位于block/genhd.c
proc_create("diskstats", 0, NULL, &proc_diskstats_operations);
proc_create("partitions", 0, NULL, &proc_partitions_operations);
module_init(proc_genhd_init);
阅读(2568) | 评论(0) | 转发(0) |