public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Fix mounting jffs2 by mtd name
@ 2005-12-14 14:25 Johannes Stezenbach
  2005-12-16 17:24 ` Johannes Stezenbach
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Stezenbach @ 2005-12-14 14:25 UTC (permalink / raw)
  To: linux-mtd

Hi,

Busybox mount insists that mtd: refers to a NFS mount:

# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 02000000 00004000 "foo"
# mount mtd:foo /mnt -t jffs2
mount: mtd: Unknown host
mount: nfsmount failed: Connection refused
mount: Mounting mtd:foo on /mnt failed: Invalid argument

I suggest new syntax:

# mount mtd/foo /mnt -t jffs2

Signed-off-by: Johannes Stezenbach <js@linuxtv.org>

Index: fs/jffs2/super.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/super.c,v
retrieving revision 1.112
diff -u -p -r1.112 super.c
--- fs/jffs2/super.c	24 Nov 2005 16:13:25 -0000	1.112
+++ fs/jffs2/super.c	14 Dec 2005 14:05:58 -0000
@@ -208,7 +208,7 @@ static struct super_block *jffs2_get_sb(
 
 	if (dev_name[0] == 'm' && dev_name[1] == 't' && dev_name[2] == 'd') {
 		/* Probably mounting without the blkdev crap */
-		if (dev_name[3] == ':') {
+		if (dev_name[3] == '/') {
 			struct mtd_info *mtd;
 
 			/* Mount by MTD device name */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Fix mounting jffs2 by mtd name
  2005-12-14 14:25 Fix mounting jffs2 by mtd name Johannes Stezenbach
@ 2005-12-16 17:24 ` Johannes Stezenbach
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Stezenbach @ 2005-12-16 17:24 UTC (permalink / raw)
  To: linux-mtd

On Wed, Dec 14, 2005, Johannes Stezenbach wrote:
> Busybox mount insists that mtd: refers to a NFS mount:
> 
> # cat /proc/mtd
> dev:    size   erasesize  name
> mtd0: 02000000 00004000 "foo"
> # mount mtd:foo /mnt -t jffs2
> mount: mtd: Unknown host
> mount: nfsmount failed: Connection refused
> mount: Mounting mtd:foo on /mnt failed: Invalid argument
> 
> I suggest new syntax:
> 
> # mount mtd/foo /mnt -t jffs2

OK, I found out this was a bug in the specific version
of busybox mount in use here. Up-to-date busybox and
util-linux mount seem to be fine.

Silly idea to fix this in the kernel ;-/

Sorry for the noise,
Johannes

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-12-16 17:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-14 14:25 Fix mounting jffs2 by mtd name Johannes Stezenbach
2005-12-16 17:24 ` Johannes Stezenbach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox