• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1SKIP_GUNZIP="true"
2TEST_DATA="test.data"
3
4echo "/ Murphy Magic.  The SeCrEt of the UnIvErSe is 43, NOT 42" > $TEST_DATA
5
6touch $TMPFILE
7$MKE2FS -N 32 -F -o Linux -b 1024 $TMPFILE 100 > /dev/null 2>&1
8$DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1
9set_current_time 200704102100
10set_super_value lastcheck 0
11set_super_value hash_seed null
12set_super_value mkfs_time 0
13mkdir dir
14mkdir dir2
15mkdir dir3
16mkdir dir4
17cd /dir
18write $TEST_DATA foo
19cd /dir2
20write $TEST_DATA bar
21cd /dir3
22write $TEST_DATA baz
23cd /dir4
24write $TEST_DATA quux
25mkdir /dir/fee
26mkdir /dir2/fie
27mkdir /dir3/foe
28mkdir /dir4/fum
29link /dir/foo /dir2/foo1
30link /dir/foo /dir3/foo2
31link /dir2/bar /dir3/bar1
32link /dir4/quux /dir/quux1
33link /dir4/quux /dir2/quux2
34set_inode_field /dir/foo block[0] 30
35set_inode_field /dir2/bar block[0] 30
36set_inode_field /dir3/baz block[0] 30
37set_inode_field /dir/fee block[0] 34
38set_inode_field /dir2/fie block[0] 34
39set_inode_field /dir3/foe block[0] 34
40q
41EOF
42
43E2FSCK_TIME=200704102100
44export E2FSCK_TIME
45
46. $cmd_dir/run_e2fsck
47
48rm -f $TEST_DATA
49
50unset E2FSCK_TIME TEST_DATA
51