Skip to content

Commit

Permalink
dumpe2fs: reduce dumpe2fs output to 80 columns or less
Browse files Browse the repository at this point in the history
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
  • Loading branch information
djwong authored and tytso committed Dec 14, 2014
1 parent fc4f5b2 commit 6aa8cff
Show file tree
Hide file tree
Showing 29 changed files with 66 additions and 27 deletions.
6 changes: 5 additions & 1 deletion misc/dumpe2fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,11 @@ static void list_desc(ext2_filsys fs, int grp_only)
EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)
printf(_(", csum 0x%08x"),
ext2fs_block_bitmap_checksum(fs, i));
fputs(_(", Inode bitmap at "), stdout);
if (getenv("DUMPE2FS_IGNORE_80COL"))
fputs(_(","), stdout);
else
fputs(_("\n "), stdout);
fputs(_(" Inode bitmap at "), stdout);
print_number(ext2fs_inode_bitmap_loc(fs, i));
print_bg_rel_offset(fs, ext2fs_inode_bitmap_loc(fs, i), 0,
first_block, last_block);
Expand Down
3 changes: 2 additions & 1 deletion tests/f_jnl_errno/expect.0
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ Journal start: 0
Group 0: (Blocks 1-8191) [ITABLE_ZEROED]
Primary superblock at 1, Group descriptors at 2-2
Reserved GDT blocks at 3-33
Block bitmap at 34 (+33), Inode bitmap at 50 (+49)
Block bitmap at 34 (+33)
Inode bitmap at 50 (+49)
Inode table at 66-321 (+65)
6862 free blocks, 2037 free inodes, 2 directories, 2037 unused inodes
Free blocks: 1330-8191
Expand Down
2 changes: 1 addition & 1 deletion tests/j_short_revoke_trans/script
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ echo Exit status is $status >> $OUT.new
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new

bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*Block bitmap at \([0-9]*\) .*Inode bitmap at \([0-9]*\).*$/\1,\2/g' | tr '\n' ',')"
bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*bitmap at \([0-9]*\).*$/\1/g' | tr '\n' ',')"

echo "debugfs write journal" >> $OUT
echo "jo" > $TMPFILE.cmd
Expand Down
2 changes: 1 addition & 1 deletion tests/j_short_revoke_trans_mcsum_64bit/script
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ echo Exit status is $status >> $OUT.new
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new

bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*Block bitmap at \([0-9]*\) .*Inode bitmap at \([0-9]*\).*$/\1,\2/g' | tr '\n' ',')"
bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*bitmap at \([0-9]*\).*$/\1/g' | tr '\n' ',')"

$DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT

Expand Down
2 changes: 1 addition & 1 deletion tests/j_short_trans/script
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ echo Exit status is $status >> $OUT.new
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new

bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*Block bitmap at \([0-9]*\) .*Inode bitmap at \([0-9]*\).*$/\1,\2/g' | tr '\n' ',')"
bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*bitmap at \([0-9]*\).*$/\1/g' | tr '\n' ',')"

echo "debugfs write journal" >> $OUT
echo "jo" > $TMPFILE.cmd
Expand Down
2 changes: 1 addition & 1 deletion tests/j_short_trans_64bit/script
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ echo Exit status is $status >> $OUT.new
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new

bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*Block bitmap at \([0-9]*\) .*Inode bitmap at \([0-9]*\).*$/\1,\2/g' | tr '\n' ',')"
bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*bitmap at \([0-9]*\).*$/\1/g' | tr '\n' ',')"

$DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT

Expand Down
2 changes: 1 addition & 1 deletion tests/j_short_trans_mcsum_64bit/script
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ echo Exit status is $status >> $OUT.new
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new

bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*Block bitmap at \([0-9]*\) .*Inode bitmap at \([0-9]*\).*$/\1,\2/g' | tr '\n' ',')"
bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*bitmap at \([0-9]*\).*$/\1/g' | tr '\n' ',')"

$DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT

Expand Down
2 changes: 1 addition & 1 deletion tests/j_short_trans_old_csum/script
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ echo Exit status is $status >> $OUT.new
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new

bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*Block bitmap at \([0-9]*\) .*Inode bitmap at \([0-9]*\).*$/\1,\2/g' | tr '\n' ',')"
bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*bitmap at \([0-9]*\).*$/\1/g' | tr '\n' ',')"

$DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT

Expand Down
2 changes: 1 addition & 1 deletion tests/j_short_trans_open_recover/script
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ echo Exit status is $status >> $OUT.new
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new

bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*Block bitmap at \([0-9]*\) .*Inode bitmap at \([0-9]*\).*$/\1,\2/g' | tr '\n' ',')"
bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*bitmap at \([0-9]*\).*$/\1/g' | tr '\n' ',')"

echo "debugfs write journal" >> $OUT
echo "jo" > $TMPFILE.cmd
Expand Down
2 changes: 1 addition & 1 deletion tests/j_short_trans_recover/script
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ echo Exit status is $status >> $OUT.new
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new

bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*Block bitmap at \([0-9]*\) .*Inode bitmap at \([0-9]*\).*$/\1,\2/g' | tr '\n' ',')"
bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*bitmap at \([0-9]*\).*$/\1/g' | tr '\n' ',')"

echo "debugfs write journal" >> $OUT
echo "jo" > $TMPFILE.cmd
Expand Down
2 changes: 1 addition & 1 deletion tests/j_short_trans_recover_mcsum_64bit/script
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ echo Exit status is $status >> $OUT.new
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new

bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*Block bitmap at \([0-9]*\) .*Inode bitmap at \([0-9]*\).*$/\1,\2/g' | tr '\n' ',')"
bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*bitmap at \([0-9]*\).*$/\1/g' | tr '\n' ',')"

$DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT

Expand Down
2 changes: 1 addition & 1 deletion tests/j_short_uncommitted_trans/script
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ echo Exit status is $status >> $OUT.new
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new

bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*Block bitmap at \([0-9]*\) .*Inode bitmap at \([0-9]*\).*$/\1,\2/g' | tr '\n' ',')"
bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*bitmap at \([0-9]*\).*$/\1/g' | tr '\n' ',')"

echo "debugfs write journal" >> $OUT
echo "jo" > $TMPFILE.cmd
Expand Down
2 changes: 1 addition & 1 deletion tests/j_short_uncommitted_trans_mcsum_64bit/script
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ echo Exit status is $status >> $OUT.new
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new

bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*Block bitmap at \([0-9]*\) .*Inode bitmap at \([0-9]*\).*$/\1,\2/g' | tr '\n' ',')"
bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*bitmap at \([0-9]*\).*$/\1/g' | tr '\n' ',')"

$DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT

Expand Down
3 changes: 2 additions & 1 deletion tests/m_64bit_flexbg/expect.1
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ Default directory hash: half_md4
Group 0: (Blocks 1-1023)
Primary superblock at 1, Group descriptors at 2-2
Reserved GDT blocks at 3-9
Block bitmap at 10 (+9), Inode bitmap at 26 (+25)
Block bitmap at 10 (+9)
Inode bitmap at 26 (+25)
Inode table at 42-57 (+41)
982 free blocks, 117 free inodes, 2 directories
Free blocks: 24-25, 28-41, 58-1023
Expand Down
3 changes: 3 additions & 0 deletions tests/m_bigjournal/script
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
DESCRIPTION="journal over 4GB in size"
FS_SIZE=11000000
DUMPE2FS_IGNORE_80COL=1
export DUMPE2FS_IGNORE_80COL
MKE2FS_OPTS="-t ext4 -G 512 -N 1280 -J size=5000 -q -E lazy_journal_init,lazy_itable_init,nodiscard"
if [ $(uname -s) = "Darwin" ]; then
echo "$test_name: $DESCRIPTION: skipped for HFS+ (no sparse files)"
return 0
fi
. $cmd_dir/run_mke2fs
unset DUMPE2FS_IGNORE_80COL
6 changes: 4 additions & 2 deletions tests/m_dasd_bs/expect.1
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,17 @@ Default directory hash: half_md4
Group 0: (Blocks 0-16383)
Primary superblock at 0, Group descriptors at 1-1
Reserved GDT blocks at 2-32
Block bitmap at 33 (+33), Inode bitmap at 34 (+34)
Block bitmap at 33 (+33)
Inode bitmap at 34 (+34)
Inode table at 35-546 (+35)
15827 free blocks, 8181 free inodes, 2 directories
Free blocks: 557-16383
Free inodes: 12-8192
Group 1: (Blocks 16384-32767)
Backup superblock at 16384, Group descriptors at 16385-16385
Reserved GDT blocks at 16386-16416
Block bitmap at 16417 (+33), Inode bitmap at 16418 (+34)
Block bitmap at 16417 (+33)
Inode bitmap at 16418 (+34)
Inode table at 16419-16930 (+35)
15837 free blocks, 8192 free inodes, 0 directories
Free blocks: 16931-32767
Expand Down
3 changes: 3 additions & 0 deletions tests/m_desc_size_128/script
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
DESCRIPTION="enable 128-byte group descriptor on mkfs"
FS_SIZE=131072
DUMPE2FS_IGNORE_80COL=1
export DUMPE2FS_IGNORE_80COL
MKE2FS_OPTS="-b 1024 -O 64bit,extents -g 1024 -N 8192 -E desc_size=128"
. $cmd_dir/run_mke2fs
unset DUMPE2FS_IGNORE_80COL
3 changes: 3 additions & 0 deletions tests/m_extent_journal/script
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
DESCRIPTION="extent-mapped journal"
FS_SIZE=65536
DUMPE2FS_IGNORE_80COL=1
export DUMPE2FS_IGNORE_80COL
MKE2FS_OPTS="-O extents -j"
. $cmd_dir/run_mke2fs
unset DUMPE2FS_IGNORE_80COL
3 changes: 2 additions & 1 deletion tests/m_large_file/expect.1
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ Default directory hash: half_md4
Group 0: (Blocks 0-16383)
Primary superblock at 0, Group descriptors at 1-1
Reserved GDT blocks at 2-4
Block bitmap at 5 (+5), Inode bitmap at 6 (+6)
Block bitmap at 5 (+5)
Inode bitmap at 6 (+6)
Inode table at 7-10 (+7)
16367 free blocks, 53 free inodes, 2 directories
Free blocks: 17-16383
Expand Down
3 changes: 3 additions & 0 deletions tests/m_meta_bg/script
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
DESCRIPTION="meta blockgroup feature"
FS_SIZE=131072
DUMPE2FS_IGNORE_80COL=1
export DUMPE2FS_IGNORE_80COL
MKE2FS_OPTS="-O meta_bg,sparse_super,^resize_inode -g 1024"
. $cmd_dir/run_mke2fs
unset DUMPE2FS_IGNORE_80COL
6 changes: 4 additions & 2 deletions tests/m_mmp/expect.1
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,17 @@ MMP update interval: 5
Group 0: (Blocks 0-32767)
Primary superblock at 0, Group descriptors at 1-1
Reserved GDT blocks at 2-16
Block bitmap at 17 (+17), Inode bitmap at 18 (+18)
Block bitmap at 17 (+17)
Inode bitmap at 18 (+18)
Inode table at 19-1042 (+19)
31718 free blocks, 32757 free inodes, 2 directories
Free blocks: 1050-32767
Free inodes: 12-32768
Group 1: (Blocks 32768-65535)
Backup superblock at 32768, Group descriptors at 32769-32769
Reserved GDT blocks at 32770-32784
Block bitmap at 32785 (+17), Inode bitmap at 32786 (+18)
Block bitmap at 32785 (+17)
Inode bitmap at 32786 (+18)
Inode table at 32787-33810 (+19)
31725 free blocks, 32768 free inodes, 0 directories
Free blocks: 33811-65535
Expand Down
3 changes: 3 additions & 0 deletions tests/m_no_opt/script
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
DESCRIPTION="no filesystem extensions"
FS_SIZE=65536
DUMPE2FS_IGNORE_80COL=1
export DUMPE2FS_IGNORE_80COL
MKE2FS_OPTS="-O ^sparse_super,^filetype,^resize_inode,^dir_index,^ext_attr"
. $cmd_dir/run_mke2fs
unset DUMPE2FS_IGNORE_80COL
3 changes: 3 additions & 0 deletions tests/m_quota/script
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ if [ "$QUOTA" != "y" ]; then
echo "$test_name: $DESCRIPTION: skipped"
return 0
fi
DUMPE2FS_IGNORE_80COL=1
export DUMPE2FS_IGNORE_80COL
. $cmd_dir/run_mke2fs
unset DUMPE2FS_IGNORE_80COL
3 changes: 3 additions & 0 deletions tests/m_raid_opt/script
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
DESCRIPTION="raid options"
FS_SIZE=131072
MKE2FS_OPTS="-E stride=13 -O sparse_super -g 1024"
DUMPE2FS_IGNORE_80COL=1
export DUMPE2FS_IGNORE_80COL
. $cmd_dir/run_mke2fs
unset DUMPE2FS_IGNORE_80COL
3 changes: 2 additions & 1 deletion tests/m_root_owner/expect.1
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ Default directory hash: half_md4
Group 0: (Blocks 1-1023)
Primary superblock at 1, Group descriptors at 2-2
Reserved GDT blocks at 3-5
Block bitmap at 6 (+5), Inode bitmap at 7 (+6)
Block bitmap at 6 (+5)
Inode bitmap at 7 (+6)
Inode table at 8-23 (+7)
986 free blocks, 117 free inodes, 2 directories
Free blocks: 38-1023
Expand Down
3 changes: 3 additions & 0 deletions tests/m_std/script
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
DESCRIPTION="standard filesystem options"
DUMPE2FS_IGNORE_80COL=1
export DUMPE2FS_IGNORE_80COL
FS_SIZE=65536
. $cmd_dir/run_mke2fs
unset DUMPE2FS_IGNORE_80COL
3 changes: 3 additions & 0 deletions tests/m_uninit/script
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
DESCRIPTION="uninitialized group feature"
DUMPE2FS_IGNORE_80COL=1
export DUMPE2FS_IGNORE_80COL
FS_SIZE=131072
MKE2FS_OPTS="-O uninit_bg"
. $cmd_dir/run_mke2fs
unset DUMPE2FS_IGNORE_80COL
8 changes: 4 additions & 4 deletions tests/r_move_itable/script
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
$TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1

echo dumpe2fs test.img >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed -e '/Block bitmap.*$/N;s/\n Inode bitmap/, Inode bitmap/g' >> $OUT

echo "--------------------------------" >> $OUT

Expand All @@ -53,7 +53,7 @@ $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
$TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1

echo dumpe2fs test.img >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed -e '/Block bitmap.*$/N;s/\n Inode bitmap/, Inode bitmap/g' >> $OUT

echo "--------------------------------" >> $OUT

Expand All @@ -73,7 +73,7 @@ $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
$TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1

echo dumpe2fs test.img >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed -e '/Block bitmap.*$/N;s/\n Inode bitmap/, Inode bitmap/g' >> $OUT

echo "--------------------------------" >> $OUT

Expand All @@ -93,7 +93,7 @@ $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
$TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1

echo dumpe2fs test.img >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed -e '/Block bitmap.*$/N;s/\n Inode bitmap/, Inode bitmap/g' >> $OUT

rm -f $TMPFILE

Expand Down
6 changes: 3 additions & 3 deletions tests/r_resize_inode/script
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
$TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1

echo dumpe2fs test.img >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed -e '/Block bitmap.*$/N;s/\n Inode bitmap/, Inode bitmap/g' >> $OUT

echo "--------------------------------" >> $OUT

Expand All @@ -59,7 +59,7 @@ $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
$TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1

echo dumpe2fs test.img >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed -e '/Block bitmap.*$/N;s/\n Inode bitmap/, Inode bitmap/g' >> $OUT

echo "--------------------------------" >> $OUT

Expand All @@ -79,7 +79,7 @@ $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
$TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1

echo dumpe2fs test.img >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed -e '/Block bitmap.*$/N;s/\n Inode bitmap/, Inode bitmap/g' >> $OUT

rm -f $TMPFILE
cmp -s $OUT $EXP
Expand Down

0 comments on commit 6aa8cff

Please sign in to comment.