DEV3=/dev/loop4
# Name of file systems to format your device. Supported file systems
-# include: ext2, ext3, xfs, reiserfs, nfs, nfs2, nfs3, nfs4, and jffs2.
+# Include the following:
+# 1. Disk based: ext2, ext3, ext4, reiserfs, and xfs.
+# 2. Network: nfs, nfs2, and nfs3 (nfs4 support pending).
+# 3. Special: jffs2, ramfs, and tmpfs.
case ${MYFS} in
# jffs2 is special: only the leftmost filesystem uses it
- jffs* )
+ jffs* | ramfs | tmpfs )
FS0=${MYFS}
FS1=ext2
FS2=ext2
DEV3=/dev/loop3
# Name of file systems to format your device. Supported file systems
-# include: ext2, ext3, xfs, reiserfs, nfs, nfs2, nfs3, nfs4, and jffs2.
+# Include the following:
+# 1. Disk based: ext2, ext3, ext4, reiserfs, and xfs.
+# 2. Network: nfs, nfs2, and nfs3 (nfs4 support pending).
+# 3. Special: jffs2, ramfs, and tmpfs.
case ${MYFS} in
# jffs2 is special: only the leftmost filesystem uses it
- jffs* )
+ jffs* | ramfs | tmpfs )
FS0=${MYFS}
FS1=ext2
FS2=ext2
fs=$(eval echo \$FS$i)
case "$dev" in
- /dev/loop*|/dev/.static/dev/loop*)
+ /dev/loop*|/dev/.static/dev/loop* )
case "$fs" in
jffs2 )
runcmd cp jffs2-empty.img /tmp/fs.$$.$i
+ runcmd losetup $dev /tmp/fs.$$.$i
+ ;;
+ ramfs | tmpfs ) # nothing needed
;;
* )
runcmd dd if=/dev/zero of=/tmp/fs.$$.$i bs=1024k count=1 seek=100 2> /dev/null
+ runcmd losetup $dev /tmp/fs.$$.$i
;;
esac
- runcmd losetup $dev /tmp/fs.$$.$i
- ;;
- *)
;;
esac
runcmd mkdir -p /n/lower/b$i
runcmd mount -t ext4dev $dev /n/lower/b$i
;;
+ ramfs | tmpfs )
+ runcmd mount -t $fs -o size=100m /n/lower/b$i /n/lower/b$i
+ ;;
* )
runcmd mkfs -t $fs -q $dev
runcmd mkdir -p /n/lower/b$i
runcmd rmmod block2mtd
runcmd rmmod mtdblock
;;
- * )
- ;;
esac
case "$dev" in
/dev/loop*|/dev/.static/dev/loop*)
- runcmd losetup -d $dev
- runcmd rm -f /tmp/fs.$$.$branch
- ;;
- *)
- ;;
+ case "$fs" in
+ ramfs | tmpfs ) # nothing needed
+ ;;
+ * )
+ runcmd losetup -d $dev
+ runcmd rm -f /tmp/fs.$$.$branch
+ ;;
+ esac
esac
}
}
test_ro
-# skip on jffs2 (doesn't support writeable mappings)
-if test "$FS0" != "jffs2" ; then
- test_rw
-fi
+# skip on file systems which do not allow writeable mappings
+case "$FS0" in
+ jffs2 | ramfs ) ;;
+ * ) test_rw ;;
+esac
complete_test
DEV3=/dev/.static/dev/loop3
# Name of file systems to format your device. Supported file systems
-# include: ext2, ext3, xfs, reiserfs, nfs, nfs2, nfs3, nfs4, and jffs2.
+# Include the following:
+# 1. Disk based: ext2, ext3, ext4, reiserfs, and xfs.
+# 2. Network: nfs, nfs2, and nfs3 (nfs4 support pending).
+# 3. Special: jffs2, ramfs, and tmpfs.
case ${MYFS} in
# jffs2 is special: only the leftmost filesystem uses it
- jffs* )
+ jffs* | ramfs | tmpfs )
FS0=${MYFS}
FS1=ext2
FS2=ext2