diff options
author | Theodore Ts'o <tytso@mit.edu> | 2017-01-31 01:02:03 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2017-01-31 01:02:03 -0500 |
commit | 134a833ae46183b26cccc9c61e9e438c9388fa87 (patch) | |
tree | f2b01494451c246305481f0d60e90643e623e78f /util | |
parent | 75a790455c43abf623be10b52007b211b25ded3c (diff) | |
download | android_external_e2fsprogs-134a833ae46183b26cccc9c61e9e438c9388fa87.tar.gz android_external_e2fsprogs-134a833ae46183b26cccc9c61e9e438c9388fa87.tar.bz2 android_external_e2fsprogs-134a833ae46183b26cccc9c61e9e438c9388fa87.zip |
Add utility script which generates a small sample file system
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'util')
-rw-r--r-- | util/gen-sample-fs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/util/gen-sample-fs b/util/gen-sample-fs new file mode 100644 index 00000000..a6d7b31f --- /dev/null +++ b/util/gen-sample-fs @@ -0,0 +1,30 @@ +#!/bin/bash + +MNT=/mnt +FS=/tmp/foo.img + +cp /dev/null $FS +mke2fs -t ext4 -O inline_data -I 256 -b 4096 $FS 256 +mount -t ext4 $FS $MNT +ln -s symlink_data $MNT/symlink +for i in 30 70 500 1023 1024 1500; do + ln -s /$(perl -e "print 'x' x $i;") $MNT/l_$i +done +touch $MNT/acl +setfacl -m u:daemon:r $MNT/acl +setfacl -m u:bin:rx $MNT/acl +setfacl -m g:mail:rw $MNT/acl +setfacl -m g:daemon:r $MNT/acl +touch $MNT/simple_acl +setfacl -m u:daemon:r $MNT/simple_acl +touch $MNT/xattr +attr -s foo -V bar $MNT/xattr +echo -e "one\n\ttwo" | attr -s quux $MNT/xattr +echo -e "abc\001\002\003" | attr -s def $MNT/xattr +echo file_data > $MNT/small_inline +a="I am a very model of a modern major general;" +a="$a I've information vegetable, animal and mineral" +echo $a > $MNT/big_inline +umount $MNT + + |