From: Aras Vaichas <arasv@magellan-technology.com>
To: MTD-LIST <linux-mtd@lists.infradead.org>
Subject: problem with mtdblock dev entries over 9
Date: Mon, 06 Dec 2004 13:40:12 +1100 [thread overview]
Message-ID: <41B3C68C.8080808@magellan-technology.com> (raw)
I'm using the 2.4.x version of the MTD cvs.
I recently created over 9 MTD partitions and I noticed that /dev/mtdblock had
incorrect names for entries 10 and 11 instead they were ":" and ";". The
/dev/mtd directory was OK though.
e.g
/root # ll /dev/mtdblock
drwxr-xr-x 1 root root 0 Jan 1 1970 ./
drwxr-xr-x 1 root root 0 Jan 1 1970 ../
brw-rw-rw- 1 root root 31, 0 Jan 1 1970 0
brw-rw-rw- 1 root root 31, 1 Jan 1 1970 1
brw-rw-rw- 1 root root 31, 2 Jan 1 1970 2
brw-rw-rw- 1 root root 31, 3 Jan 1 1970 3
brw-rw-rw- 1 root root 31, 4 Jan 1 1970 4
brw-rw-rw- 1 root root 31, 5 Jan 1 1970 5
brw-rw-rw- 1 root root 31, 6 Jan 1 1970 6
brw-rw-rw- 1 root root 31, 7 Jan 1 1970 7
brw-rw-rw- 1 root root 31, 8 Jan 1 1970 8
brw-rw-rw- 1 root root 31, 9 Jan 1 1970 9
brw-rw-rw- 1 root root 31, 10 Jan 1 1970 :
brw-rw-rw- 1 root root 31, 11 Jan 1 1970 ;
solution (assuming number of partitions does not exceed 99!):
--- drivers/mtd/mtd_blkdevs-24.c.orig 2004-12-06 13:29:21.568417264 +1100
+++ drivers/mtd/mtd_blkdevs-24.c 2004-12-06 13:35:25.443099904 +1100
@@ -476,10 +476,9 @@
}
#ifdef CONFIG_DEVFS_FS
if (!tr->part_bits) {
- char name[2];
+ char name[3];
- name[0] = '0' + new->devnum;
- name[1] = 0;
+ sprintf( name, "%d", new->devnum );
new->blkcore_priv =
devfs_register(tr->blkcore_priv->devfs_dir_handle,
regards,
Aras Vaichas
reply other threads:[~2004-12-06 2:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41B3C68C.8080808@magellan-technology.com \
--to=arasv@magellan-technology.com \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox